ID: 8662
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Arrays related
Assigned To:
Comments:
Please, read the manual.
If you want to have array indices inside strings, you must enclose them within curly
braces:
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: http://bugs.php.net/?id=8662
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]