PHP String Explode Trim


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

http://stackoverflow.com/questions/19347005/how-can-i-explode-and-trim-whitespace