Re: Re: Miserable escape string problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tg-php@xxxxxxxxxxxxxxxxxxxxxx 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux