$str = "This is a string";
$words = explode(" ", $str);
Works fine, but spaces still go into array:
$words === array ('This', 'is', 'a', '', '', '', 'string');//true
I would prefer to have words only with no spaces and keep the information …
I am facing an issue with URLs, I want to be able to convert titles that could contain anything and have them stripped of all special characters so they only have letters and numbers and of course I would like …
I need to match a space character in a PHP regular expression. Anyone got any ideas?
I mean like "gavin schulz", the space in between the two words. I am using a regular expression to make sure that I only …