--- Mike Johnson <[EMAIL PROTECTED]> wrote: >
> For the record, there's a syntax error in there --
> the closing curly brace is missing.
> 
> echo "{$row["Password"]}\n";
>                --------^
> 
> Also, I've never tried this syntax with
> double-quotes. Do the curly braces keep the PHP
> parser from thinking that the opening " for Password
> is a close of the string? I use single quotes in
> that kind of situation, FWIW.

yeah, my bad, the ending curly braces were missing.
when using double quotes, the curly braces are there
so that it can identify the whole variable as an array
type. yeah, it would probably mix up the meaning of
the double quotes in the array key name. even i use
single quotes for array keys, was just showing how the
syntax should be in that situation.

the manual uses " and ' quotes in just about all
contexts anyway. if the whole thing is in double
quotes then it needs curly braces anyway, regardless
of which quotes i use for the key. i haven't come
across anything specific regarding this in the
documentation. for the array stuff in strings and
filehandling, it's shown with single quotes. whereas,
in the array function examples, they use double
quotes. not using any quotes... <<<END_OF_EXAMPLE
// Works but note that this works differently outside
string-quotes
echo "A banana is $fruits[banana].";
END_OF_EXAMPLE;

so for safety, i use curly braces and single quotes.
maybe double quotes can be used when u want to use a
weird key name like: $a["all$myvars_start_with_all"]
though $a['all'.$myvars_start_with_all.'EVERYWHERE']
would be clearer in that case. (uself if u're
importing variables and prefixing them with something
so that u don't need to re-write code u've written
and/or can adapt code written for register globals on
while using it when off.

just mho.

abs

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to