And redundant spaces should be converted to one space.
The only exception is when a value is followed by a comma and a space.
Then the search string should be taken literally.
So if for example you filled in:
mozart amadeus, then this should be split into:
'mozart' and 'amadeus'.
But if you filled in 'mozart, amadeus' it should stay 'mozart, amadeus'.
These values shoud be seperated in put into an array.
So if someone filled in: mozart grieg, beethoven bach.
I would have an array with the values:
array[0] = mozart
array[1] = grieg, beethoven
array[2] = bach
Expand|Select|Wrap|Line Numbers
- preg_match_all('/[^\s]+/', $persoon, $m);
- $array_persoon = $m[0];
Thanks in advance,
Dimpie