Possible Duplicate:
How to split a string by multiple delimiters in PHP?
What would be the most efficient way to split a string by three delimiters at the same time, specifically a single white space, newline, and commas?
Since you've tagged your questions with php
I will stick to that. See preg_split
$split_strings = preg_split('/[\ \n\,]+/', $your_string);
This will keep the array clean too, in case your string is something like some, ,,string
, it will still result in ['some', 'string']
instead of ['some', '', '', '', 'string']
.