Create an array with the words from the string in PHP
Description
The following code shows how to create an array with the words from the string.
Example
<?php
print_r(str_word_count("Hello world!",1));
?>
The code above generates the following result.