Re: split on tabs
| From: | Rasmus Lerdorf | Date: | Wed, 05 Jul 2000 18:24:07 +0000 |
| Subject: | Re: split on tabs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5024@lists.php.net to get a copy of this message | ||
$new = split("\t",$old);
However, if your delimiter is a simple single character like this, use
explode() instead:
$new = explode("\t",$old);
(what in the world did you try? This seems so obvious to me)
-Rasmus
On Wed, 5 Jul 2000, Jose de Leon wrote:
> Okay, I've tried at least 6 different incantations of split() in order to
> split on a tab delimited record. It just doesn't work as expected.
> Additionally, there is no mention in the regex.7 manual on how to split on
> tabs! I supposed I could use the ctype 'space', but that won't work since
> some of the fields have spaces in them. I only want to split on tabs.
>
> Suggestion on correct syntax please?
>
>
> Thanks,
>
> Jose de Leon
> System Administrator
> InVision Telecommunications
> (209) 549-8800
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> FAST Internet Access and no bull.
> InVision DSL, www.invisiondsl.com
>
>
>
>