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
for
clarity. This is especially helpful for situations like this, where
the
rest of the string interferes with syntax.
On Thu, October 5, 2006 10:55 am, [EMAIL PROTECTED] wrote:
> The point is, \ should escape only the {, just like
> it does when you escape a variable like this "\$var1"
> In this case, \ only escapes the $.
The whole thing with {} inside a string has always struck me as a
total hack to fix somethi
Google Kreme wrote:
> So what is "{{$var1} : {$var2}}"
Within a quoted string, you can surround variable names with braces for
clarity. This is especially helpful for situations like this, where the
rest of the string interferes with syntax.
A more common example is when a variable name is immedi
Google Kreme wrote:
On 05 Oct 2006, at 10:50 , [EMAIL PROTECTED] wrote:
So, yes, there is no escaping for { in PHP and that would be it.
So what is "{{$var1} : {$var2}}" ??
A workaround.
ciao
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
Unneeded clutter, yes.. but I owe you an apology and since the mistake was
public, I'll make the apology public as well.
I use a 'universal' email checker called ePrompter. It does text-only, no
HTML, so it filters out HTML messages, but have never had a problem with it
filtering out braces, b
On 05 Oct 2006, at 10:50 , [EMAIL PROTECTED] wrote:
So, yes, there is no escaping for { in PHP and that would be it.
So what is "{{$var1} : {$var2}}" ??
--
MEGAHAL: within my penguin lies a torrid story of hate and love.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
[EMAIL PROTECTED] wrote:
> I'd like to have the output as "{11: 22}".
My previous example demonstrates that:
> echo "{{$foo}: {$bar}}";
Chris
--
Chris Shiflett
http://shiflett.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
[EMAIL PROTECTED] 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 do
Let's look at your original message:
Using this string:
"$var1: $var2"
of course it doesn't work as some might expect.
It works exactly as expected. Within double-quotes, things like variables get
evaluated. In this case $var1 and $var2 will be repl
Sorry tg, you missed the whole point. Read again.
The escaping works fine for me.. using the code:
$var1 = 1;
$var2 = 3;
echo "\$var1: $var2";
print "\$var1: $var2";
print ("\$var1: $var2");
All output:
$var1: 3
as expected.
Is there a way to re-define the escape character or something? I
The escaping works fine for me.. using the code:
$var1 = 1;
$var2 = 3;
echo "\$var1: $var2";
print "\$var1: $var2";
print ("\$var1: $var2");
All output:
$var1: 3
as expected.
Is there a way to re-define the escape character or something? I can't think
of why that wouldn't escape the $ prope
Well Kae, if you reply 3 times let me also reply you once.
What you try to suggest is a workaround. A workaround should
not be needed for such a basic thing. Ever.
The point is, \ should escape only the {, just like
it does when you escape a variable like this "\$var1"
In this case, \ only escape
[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 in the string output?
Why doe
14 matches
Mail list logo