ID: 8662
Updated by: cynic
Old-Status: Open
Status: Closed
Bug Type: Arrays related
Assigned To: 

Please, read the manual. 
If you want to have array indices inside strings, you must enclose them within curly 

echo "Hello: {$PHPsource[0][bar]}"; 

Previous Comments:

[2001-01-11 16:52:03] [EMAIL PROTECTED]
$PHPsource = array( 
    "0"  => array( 
          "foo"  => "Hello", 
          "bar"  => "World" 

echo "Hello: $PHPsource[0][bar]"; 

Sould be:
"Hello: world" 

But comes up:
"Hello: Array[bar]" 

This is working:
echo "Hello: ".$PHPsource[0][bar]; 

It seems like inside the " there is a problem identifying varibels the right way.


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to