Whats the difference between $_SESSION[foo] and $_SESSION['foo'] I have been
using the 's but they seem to be unecessary?

I run into trouble if I try something like:


$query = " select * from table where (test.id = '$_SESSION['foo']') ";

but the following works:

$query = " select * from table where (test.id = '$_SESSION[foo]') ";


I know there is some way to properly escape characters but is there any
reason why I shouldn't just omit the 's?


Thanks!

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

Reply via email to