Is Not Supported in Strings


"{$" Is Not Supported in Strings

The "{$" combination is not allowed in strings. To place the "{$" combination in strings, you must escape it like this: "\ {$" .

Valid in PHP 3

 <?php $foo = "Windows"; print str_replace ("{$foo} ", "Linux", "This {Windows} rules."); ?> 

Valid in PHP 4

 <?php $foo = "Windows"; print str_replace ("\{$foo} ", "Linux", "This {Windows} rules."); ?> 


PHP Developer's Cookbook
PHP Developers Cookbook (2nd Edition)
ISBN: 0672323257
EAN: 2147483647
Year: 2000
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net