Re: Miserable escape string problem
| From: | Kae Verens | Date: | Thu, 05 Oct 2006 15:36:53 +0000 |
| Subject: | Re: Miserable escape string problem | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-242676@lists.php.net to get a copy of this message | ||
intra_test@roibm.de wrote:
Using this string: "{$var1: $var2}" ....of course it doesn't work as some might expect. But why in the name of [whatever, too many to list] doesn't this one below work? "\{$var1: $var2}" If \ is an escape character why does it also appear in the string output? Why does the above \ escape {$var1 and not only the {? Miserable.because {$var1} is a valid syntactical construct? try this instead: '{'.$var1.': '.$var2.'}' Kae