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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you’ve tagged your questions with
phpI will stick to that. Seepreg_splitThis 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'].