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.
Thanks Chris, I already emailed him on private 'cause I didn't
want to clutter the list unneeded.
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:
It occurs to me I wasn't clear enough, although one could have figure
it out.
By using this:
===============================
$var1 = 11; $var2 = 22;
outputstringfunction("{$var1: $var2}"); //hypothetical code
===============================
I'd like to have the output as "{11: 22}".
By using "{{$var1}: {$var2}}" it works just fine, but this is a mess,
I can't live with. What I am using now is "{ $var1: $var2}", better.
I guess what I am asking for is more or less uninteresting to most of
the PHP developers(many are just coders, really... for the difference
search the net) that eat up whatever offered, so I might just rest my
case.
So, yes, there is no escaping for { in PHP and that would be it.
<?php
$foo = '123';
$bar = '456';
echo "{{$foo}: {$bar}}";
echo '{$foo: $bar}';
?>
Hope that helps.
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php