sungpeng Posted November 7, 2012 Share Posted November 7, 2012 $content = "hello"; $content = 'hello'; possible to wrap it in other ways and works like $content =(hello); $content=*hello*; Any suggestions ? 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? 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. 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 Link to comment https://forums.phpfreaks.com/topic/270392-wrap-in-other-ways/#findComment-1390733 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.