Re: Miserable escape string problem
| From: | intra_test at roibm dot de | Date: | Thu, 05 Oct 2006 16:37:57 +0000 |
| Subject: | Re: Miserable escape string problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242684@lists.php.net to get a copy of this message | ||
John Wells wrote:
....
Excerpt: Since you can't escape '{', this syntax will only be recognised when the $ is immediately following the {. (Use "{\$" to get a literal "{$"). Does that help?Not really, John. =============================== $var1 = 1; $var2 = 2; print("{\$var1: $var2}"); =============================== will output "{$var1: 2}". I need this output "{1: 2}". What I need is an escape character for the {, but it looks like PHP doesn't have any.