phpllama Posted December 25, 2007 Share Posted December 25, 2007 How can I read the amount of spaces in a string?? I'm really stuck on this one ??? $string = "abc de ei ao aioin eio" Result would be 5 Link to comment https://forums.phpfreaks.com/topic/83110-spaces-in-a-string/ Share on other sites More sharing options...
~n[EO]n~ Posted December 25, 2007 Share Posted December 25, 2007 <?php $string = "abc de ei ao aioin eio"; echo substr_count($string, ' '); // 5 ?> Link to comment https://forums.phpfreaks.com/topic/83110-spaces-in-a-string/#findComment-422773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.