hoangthi Posted May 11, 2014 Share Posted May 11, 2014 I have a sentence: $s = 'this,is,a,my example !'; So I want to get this: $s2[0] = this $s2[1] = is $s2[2] = a $s2[3] = my $s2[4] = my example ! I tried to use a for loop to strlen ($s) but not successful So thanks for helping Link to comment https://forums.phpfreaks.com/topic/288400-how-to-get-words-in-a-sentence/ Share on other sites More sharing options...
hoangthi Posted May 11, 2014 Author Share Posted May 11, 2014 Oh right, I can use function: explode Link to comment https://forums.phpfreaks.com/topic/288400-how-to-get-words-in-a-sentence/#findComment-1479054 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.