PHP nesting quotes -


the following fails:

$result = mysql_query("select * tasks userid = '$_session['userid']'"); 

i tried following:

$userid = $_session['userid']; $result = mysql_query("select * tasks userid = '$userid'"); 

and works. there way without making separate variable?

thanks!

or this:

$result = mysql_query("select * tasks userid = '{$_session['userid']}'"); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -