Eggzorcist Posted August 25, 2009 Share Posted August 25, 2009 I currently use mysql_real_escape function in order to secure my inputed strings, however, this has created complication when trying to show html codes which contain double quotes for styling purposes... I tried fixing that with: $descriptiondetails = str_replace("\"", "", $info['pagedescription']); $descriptiondetails = str_replace("\", "", $info['pagedescription']); (but this makes it an error as the forward slash makes it so that double quote not there, I also tried with double quotes... How could I do this? Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/171713-solved-how-to-remove-forward-slash-in-a-string/ Share on other sites More sharing options...
dadamssg Posted August 25, 2009 Share Posted August 25, 2009 stripslashes(); ? Link to comment https://forums.phpfreaks.com/topic/171713-solved-how-to-remove-forward-slash-in-a-string/#findComment-905464 Share on other sites More sharing options...
oni-kun Posted August 25, 2009 Share Posted August 25, 2009 Yes, I don't get why you're using str_replace when you could use something such as stripslashes(); that was meant to fix escaped variables. Is there something else we're missing? Link to comment https://forums.phpfreaks.com/topic/171713-solved-how-to-remove-forward-slash-in-a-string/#findComment-905564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.