I have the below line which takes a string, explodes it to an array by ',' and then trims any whitespace for each array item.
$essentialArray = array_map('trim', explode(',', $essential_skills));
However when $essential_skills string = ""
$essentialArray
will equal Array ( [0] => )
But I need it to equal Array()
so that I can call empty()
on on it.