PHP: How do I get the explode() function to work with multiple separators in a row?
August 1, 2008 8:25 AM
Subscribe
PHP: How do I get the explode() function to work with multiple separators in a row?
I am using the explode Function on a string where there are multiple spaces after a word because it is tabbed. When I use explode as follows
$peices = explode(" ",$theData);
the $peices array does not record any of the data that comes after the section with multiples spaces. Any idea on how to get a complete array?
posted by kaozity to computers & internet (8 comments total)
1 user marked this as a favorite
Are you talking about actual tabs, or multiple spaces? Because they're not the same thing - you would need to split on the string "\t" if the string uses tabs.
posted by le morte de bea arthur at 8:40 AM on August 1, 2008