Forum Moderators: coopster
$num_words = count($t);
echo $num_words;
?>
Output -
Array
(
[0] => Array
(
[0] => this
[1] => 0
)
[1] => Array
(
[0] => is
[1] => 5
)
[2] => Array
(
[0] => a
[1] => 8
)
[3] => Array
(
[0] => set
[1] => 10
)
[4] => Array
(
[0] => of
[1] => 14
)
[5] => Array
(
[0] => words
[1] => 17
)
)
6
So this way you can have as many spaces, line breaks or tabs between words.
[php.net...]