3raser Posted July 27, 2010 Share Posted July 27, 2010 My current code: $stripslashes_description = stripslashes($row_questions['description']); $stripslashes_description = nl2br($row_questions['description']); That doesn't seem to work. Is there another way to use multiple functions on one string, without having to make the variable again? Would it be something like: $description = stripslashes(nl2br($row_questions['description'])); Quote Link to comment Share on other sites More sharing options...
trq Posted July 27, 2010 Share Posted July 27, 2010 You could either do.... $stripslashes_description = stripslashes($row_questions['description']); $stripslashes_description = nl2br($stripslashes_description); or the equivalent: $description = nl2br(stripslashes($row_questions['description'])); Quote Link to comment Share on other sites More sharing options...
trq Posted July 27, 2010 Share Posted July 27, 2010 You could either do.... $stripslashes_description = stripslashes($row_questions['description']); $stripslashes_description = nl2br($stripslashes_description); or the equivalent: $description = nl2br(stripslashes($row_questions['description'])); ps: You really shouldn't need stripslashes to display data. Quote Link to comment Share on other sites More sharing options...
3raser Posted July 27, 2010 Author Share Posted July 27, 2010 You could either do.... $stripslashes_description = stripslashes($row_questions['description']); $stripslashes_description = nl2br($stripslashes_description); or the equivalent: $description = nl2br(stripslashes($row_questions['description'])); ps: You really shouldn't need stripslashes to display data. Uhm, well I use mysql_real_escape_string and I hate the \ every time there is a '. Quote Link to comment Share on other sites More sharing options...
trq Posted July 27, 2010 Share Posted July 27, 2010 If you escape your data properly no slashes end up in your data. If using mysql_real_escape_string is leaving slashes in your data you must already have magic quotes enabled. Disable it. Quote Link to comment 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.