An input field on a form accepts a list of comma separated values.
How can I turn those values into an array whether the user enters values with a space after each comma: one, two, three
or without one,two,three
?
Basically I want to combine
$myArray = explode(', ', $myString);
and
$myArray = explode(',', $myString);