$test=$_POST["test"]; $test= preg_replace("/(\n)|(\s)|(\t)|(\')|(')|(,)/" ,',' ,$test); $test = explode("," ,$test);