Destramic Posted May 10, 2010 Share Posted May 10, 2010 I've looked at the manuel and I need to replace '-' with a space...simple I know if anyone could help me with the right function please Link to comment https://forums.phpfreaks.com/topic/201292-replace-character-in-string/ Share on other sites More sharing options...
kenrbnsn Posted May 10, 2010 Share Posted May 10, 2010 Use the str_replace function: <?php $string = 'This-is-a-test'; echo str_replace('-',' ',$string); ?> Ken Link to comment https://forums.phpfreaks.com/topic/201292-replace-character-in-string/#findComment-1056071 Share on other sites More sharing options...
jskywalker Posted May 10, 2010 Share Posted May 10, 2010 and the manual is at: http://www.php.net/manual/en/function.str-replace.php edit: i overlooked the link in the previous post.... sorry! Link to comment https://forums.phpfreaks.com/topic/201292-replace-character-in-string/#findComment-1056085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.