note 52047 rejected from function.print by betz

From: Date: Wed, 20 Apr 2005 08:08:07 +0000
Subject: note 52047 rejected from function.print by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-88241@lists.php.net to get a copy of this message
Note Submitter: justhal at gmail dot com ---- I was suprised to note that the variable interpolation of arrays is whitespace-intolerant with print. Case in point: print( "Value is { $_GET[ 'value' ] }." ); // Parse error print( "Value is {$_GET['value']}." ); // Works I expected that since I could use either syntax outside of a print statement or string, that either would work just as well inside one. I was mistaken, apparently. It was a bit confusing to me. I like using the spacing; I think it makes the code look cleaner. PHP 4.3.2 Red Hat Linux 2.4.21 Apache 2.0.46

« previous php.notes (#88241) next »