PHP 4.0 Bug #8662 Updated: Echo of type "array of array"...

From: Date: Thu, 11 Jan 2001 21:54:27 +0000
Subject: PHP 4.0 Bug #8662 Updated: Echo of type "array of array"...
Groups: php.dev 
Request: Send a blank email to php-dev+get-43818@lists.php.net to get a copy of this message
ID: 8662 Updated by: cynic Reported By: webmaster@scaninvestor.com 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] webmaster@scaninvestor.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. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8662

« previous php.dev (#43818) next »