sungpeng Posted November 7, 2012 Share Posted November 7, 2012 (edited) $content = "hello"; $content = 'hello'; possible to wrap it in other ways and works like $content =(hello); $content=*hello*; Any suggestions ? Edited November 7, 2012 by sungpeng Quote Link to comment https://forums.phpfreaks.com/topic/270392-wrap-in-other-ways/ Share on other sites More sharing options...
sungpeng Posted November 7, 2012 Author Share Posted November 7, 2012 content= '$sql = mysql_query("SELECT * FROM instructors WHERE name='$uid' AND passwd='$pwd' "); '; This doesn't work bec the $uid is wrapped ' '. how to code this using backslash? Quote Link to comment https://forums.phpfreaks.com/topic/270392-wrap-in-other-ways/#findComment-1390725 Share on other sites More sharing options...
kicken Posted November 7, 2012 Share Posted November 7, 2012 $content= '$sql = mysql_query("SELECT * FROM instructors WHERE name=\'$uid\' AND passwd=\'$pwd\' ");'; See also the manual page on strings for all the details and alternative ways. Quote Link to comment https://forums.phpfreaks.com/topic/270392-wrap-in-other-ways/#findComment-1390729 Share on other sites More sharing options...
sungpeng Posted November 7, 2012 Author Share Posted November 7, 2012 Thk you kicken guru Quote Link to comment https://forums.phpfreaks.com/topic/270392-wrap-in-other-ways/#findComment-1390733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.