How to count the number of strings after explode in PHP

1 Answer

0 votes
$s = 'php java c++ c python';

$words = explode(' ' , $s);

echo count($words);


/*
run:
 
5
 
*/

 



answered Jul 29, 2020 by avibootz
...