brown2005 Posted June 10, 2013 Share Posted June 10, 2013 Title- here is a sentence Hi, What I want to do is split the above into two and remove the - so I will have Title here is a sentence Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/279004-split-a-sentence-into-two-for-insert-into-database/ Share on other sites More sharing options...
Solution Christian F. Posted June 10, 2013 Solution Share Posted June 10, 2013 explode Quote Link to comment https://forums.phpfreaks.com/topic/279004-split-a-sentence-into-two-for-insert-into-database/#findComment-1435195 Share on other sites More sharing options...
brown2005 Posted June 10, 2013 Author Share Posted June 10, 2013 $sentence = "Title- Here is a sentence."; $words = explode("-", $sentence); echo $words[0]; echo"<br/>"; echo $words[1]; sorry ignore this I have done it. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/279004-split-a-sentence-into-two-for-insert-into-database/#findComment-1435196 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.