strange string evaluation
- From: lehmann@xxxxxx (Marten Lehmann)
- Date: Thu, 31 Jul 2008 17:54:25 +0200
Hello,
with PHP 5.0.x this two lines of code returned "{TEST}":
$var = "TEST";
print "\{$var}";
But with PHP 5.2.x, the same code returns "\{TEST}"
If I remove the backslash:
$var = "TEST";
print "{$var}";
then just "TEST" is return (without any brackets).
What is the recommended way for PHP 5.2.x to work with that? It looks a bid odd if I have to write
print "{". $var. "}";
instead.
Regards
Marten
.
- Follow-Ups:
- Re: [PHP] strange string evaluation
- From: brian
- Re: [PHP] strange string evaluation
- From: Robert Cummings
- Re: [PHP] strange string evaluation
- Prev by Date: Re: [PHP] Creating new site
- Next by Date: Re: [PHP] strange string evaluation
- Previous by thread: substr ldap php
- Next by thread: Re: [PHP] strange string evaluation
- Index(es):