Re: Re: Miserable escape string problem

From: Date: Thu, 05 Oct 2006 16:38:13 +0000
Subject: Re: Re: Miserable escape string problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-242685@lists.php.net to get a copy of this message
tg-php@gryffyndevelopment.com wrote: > Let's look at your original message: > > Using this string: > "$var1: $var2" > ....of course it doesn't work as some might expect. Either your mail client is broken, or you're misquoting him on purpose: Using this string: "{$var1: $var2}" ....of course it doesn't work as some might expect. To address the original question, a backslash does not escape the brace. Are you wanting the variables to be evaluated? Here's an example that demonstrates both: <?php $foo = '123'; $bar = '456'; echo "{{$foo}: {$bar}}"; echo '{$foo: $bar}'; ?> Hope that helps. Chris -- Chris Shiflett http://shiflett.org/

« previous php.general (#242685) next »