Re: split() function
| From: | David A Dickson | Date: | Wed, 04 Jul 2001 19:43:21 +0000 |
| Subject: | Re: split() function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-56222@lists.php.net to get a copy of this message | ||
Thanks that helped, this is what I used:
if (ereg("&", $field)) $line = explode("&", $field);
else $line = explode("//", $field);
On Thu, 5 Jul 2001 05:29:11
ReDucTor wrote:
><?php
>$line2 = explode("", $field);
>for($i = 0; $i < sizeof($line2); $i++){
> if($line2[$i] == "&")
> $useand = 1;
> else if($line[$i + 1] == "/"){
> if($line[$i] == "/"){
> $useslash = 1;
> }
> }
>}
>if($useand == 1)
>$line = explode("&", $field);
>if($useslash == 1)
>$line = explode("//", $field);
>?>
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/