Clancy19 Posted October 4, 2009 Share Posted October 4, 2009 Does stripslashes eliminate spaces? and how do i properly use stripslashes? Link to comment https://forums.phpfreaks.com/topic/176437-solved-stripslashes/ Share on other sites More sharing options...
mikesta707 Posted October 4, 2009 Share Posted October 4, 2009 it does as it name implies. it strips slashes from a string. for example <?php $str = "Is your name O\'reilly?"; // Outputs: Is your name O'reilly? echo stripslashes($str); ?> btw, googlek, and php.net are your friends. if you want to eliminate all spaces (Ie " ") then you want to use string replace, like so $newString = str_replace(" ", "", "Hello My name is Mikey!"); //output: HelloMyNameisMikey! Link to comment https://forums.phpfreaks.com/topic/176437-solved-stripslashes/#findComment-930023 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.