PHP: explode - Manual - PHP: Hypertext Preprocessor
Beaware splitting empty strings. If you split an empty string, you get back a one-element array with 0 as the key and an empty string for the value. Array ( [0] => ) To solve this, just use array_filter ......