PHP EXPLODE TRIM

$new_arr = array_map('trim', explode(',', $str));
Impossible Ibex