Re: [PHP] Miserable escape string problem

2006-10-05 Thread Robert Cummings
On Fri, 2006-10-06 at 01:35 +0200, [EMAIL PROTECTED] wrote: > Dave Goodchild wrote: > > Is this really worth all the keystrokes? Do we not have any more > > valuable ways to spend our time? > > Good point Dave. But on the wrong side. > > By counting all the keystrokes the PHP developers have to

Re: [PHP] Miserable escape string problem

2006-10-05 Thread intra_test
Dave Goodchild wrote: Is this really worth all the keystrokes? Do we not have any more valuable ways to spend our time? Good point Dave. But on the wrong side. By counting all the keystrokes the PHP developers have to type extra for code like this: "{{$foo}: {$bar}}" '{'.$var1.': '.$var2.'}' e

Re: [PHP] Miserable escape string problem

2006-10-05 Thread Dave Goodchild
Is this really worth all the keystrokes? Do we not have any more valuable ways to spend our time? On 06/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Richard Lynch wrote: > $curly = '{'; > echo "$curly$var1: $var2}"; > Horrendous workaround. Google Kreme wrote: > On 05 Oct 2006, at 11:3

Re: [PHP] Miserable escape string problem

2006-10-05 Thread intra_test
Richard Lynch wrote: $curly = '{'; echo "$curly$var1: $var2}"; Horrendous workaround. Google Kreme wrote: > On 05 Oct 2006, at 11:37 , Chris Shiflett wrote: >> Google Kreme wrote: >>> So what is "{{$var1} : {$var2}}" >> >> Within a quoted string, you can surround variable names with braces fo

Re: [PHP] Miserable escape string problem

2006-10-05 Thread Richard Lynch
On Thu, October 5, 2006 11:37 am, [EMAIL PROTECTED] wrote: > 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. >

Re: [PHP] Miserable escape string problem

2006-10-05 Thread intra_test
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}"); ==

Re: [PHP] Miserable escape string problem

2006-10-05 Thread John Wells
On 10/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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

[PHP] Miserable escape string problem

2006-10-05 Thread intra_test
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 {$var