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? Link to comment https://forums.phpfreaks.com/topic/252526-remove-mark-in-php/ 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? Link to comment https://forums.phpfreaks.com/topic/252526-remove-mark-in-php/#findComment-1294697 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 Link to comment https://forums.phpfreaks.com/topic/252526-remove-mark-in-php/#findComment-1294703 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"; ?> Link to comment https://forums.phpfreaks.com/topic/252526-remove-mark-in-php/#findComment-1294704 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 Link to comment https://forums.phpfreaks.com/topic/252526-remove-mark-in-php/#findComment-1294706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.