|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-01-11 16:52 UTC] webmaster at scaninvestor dot com
$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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
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]}";