Richard Davey wrote:
> Hi,
> 
> I am wondering if there is any tangible difference between the following two
> commands:
> 
> $x = $foo["status"];
> $x = $foo['status'];
> 
> The part in question being the use of ' or " around the "status" element of
> the array $foo.
> Both have the same end result in my case, I'm just purely wondering which is
> the correct form of syntax to use?
> 
> Cheers,
> 
> Rich
> --
> Fatal Design
> http://www.fatal-design.com
> Atari / DarkBASIC / Coding / Since 1995
> 
> 

It all depends on what you use as a key... you just follow the normal 
string standards.  If you want a variable evaluated within the key, then 
you must use "s if you purely use text then you just need 's.

For example $x=$foo["status $y"]; vs. $x=$foo['status'];


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to