dbradbury Posted March 25, 2010 Share Posted March 25, 2010 i have a string call it $text.. and it contains 'Music Video'.. how would i take out the space inbetween the two words to leave MusicVideo?? Quote Link to comment https://forums.phpfreaks.com/topic/196473-how-do-i-take-out-the-space/ Share on other sites More sharing options...
oni-kun Posted March 25, 2010 Share Posted March 25, 2010 i have a string call it $text.. and it contains 'Music Video'.. how would i take out the space inbetween the two words to leave MusicVideo?? $orig = "Music Video"; $str = str_replace(" ", "", $orig); echo $str; Quote Link to comment https://forums.phpfreaks.com/topic/196473-how-do-i-take-out-the-space/#findComment-1031583 Share on other sites More sharing options...
dbradbury Posted March 25, 2010 Author Share Posted March 25, 2010 thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/196473-how-do-i-take-out-the-space/#findComment-1031584 Share on other sites More sharing options...
oni-kun Posted March 25, 2010 Share Posted March 25, 2010 thanks!! No problem. There are many other methods, but that is the most simple and efficient. Quote Link to comment https://forums.phpfreaks.com/topic/196473-how-do-i-take-out-the-space/#findComment-1031586 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.