npsari Posted December 5, 2011 Share Posted December 5, 2011 Im trying to rermove ' symbol from a string. $string2 = str_replace(" ' ", " . ", $string1); give errors How else could i do this? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 5, 2011 Share Posted December 5, 2011 If you're getting errors, don't you think it might be helpful to post them? Quote Link to comment Share on other sites More sharing options...
npsari Posted December 5, 2011 Author Share Posted December 5, 2011 <?php $message = " hi ' bye sup ' hi "; $message2 = str_replace(' ' ', ' . ', $message); print"$message2"; ?> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/deltacar/public_html/try.php on line 3 Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted December 5, 2011 Share Posted December 5, 2011 <?php $message = " hi ' bye sup ' hi "; $message2 = str_replace("'", '', $message); print"$message2"; ?> Quote Link to comment Share on other sites More sharing options...
npsari Posted December 5, 2011 Author Share Posted December 5, 2011 Done a good job there Thank you for the support 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.