Using the apostrophe for PHP associative array element's name

Posted by Haskella on Stack Overflow See other posts from Stack Overflow or by Haskella
Published on 2010-05-22T11:48:57Z Indexed on 2010/05/22 11:50 UTC
Read the original article Hit count: 536

Filed under:
|

Hi I've been trying to figure out how to put something like Joe's Fruits into a PHP array something like this:

<?php
$arr = array(
'Fruitland' => '3ddlskdf3',
'Joe's Fruits' => 'dddfdfer3',
);
?>

Using the above for example (stackoverflow's code color should tell you this by now), the array will take it as 'Joe' between the two apostrophes instead of the whole 'Joe's Fruits' is there any way I can do this without just calling it 'Joes Fruits'?

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays