Mantis - Quercus
Viewing Issue Advanced Details
586 minor always 12-27-05 15:58 12-27-05 18:03
creich  
 
normal  
closed  
fixed  
none    
none 3.0.18  
0000586: Improper handling of associative array within double quotes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> [^]
<html xmlns="http://www.w3.org/1999/xhtml"> [^]
<head></head>
<body>
<?php
  $fruits = array('red' => 'Apples','yellow' => 'Bananas','beige' => 'Cantaloupes', 'brown' => 'Dates');

  echo "Array element\"1\" = $fruits[red]
";
?>
</body>
</html>

Should output:

Array element "1" = Apples

Instead outputs:

Array element "1" =

Notes
(0000585)
creich   
12-27-05 15:59   
can get around this by:

echo "Array element\"1\" = ".$fruits['red']."
";
(0000591)
ferg   
12-27-05 18:03   
php/313j