Re: loop through string
| From: | Ignatius Reilly | Date: | Sun, 05 Jan 2003 19:43:50 +0000 |
| Subject: | Re: loop through string | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17654@lists.php.net to get a copy of this message | ||
// transform string into an array
$arr = explode( ',', $mylist ) ;
// loop the array
foreach( $arr as $element )
Ignatius
____________________________________________
----- Original Message -----
From: "Gregory Lewis" <php@interdatacentral.com>
To: "php-windows" <php-windows@lists.php.net>
Sent: Sunday, January 05, 2003 8:18 PM
Subject: [PHP-WIN] loop through string
> Hi my name is Greg Lewis and I'm new to this list and to PHP. I have
experience with Cold Fusion, and so hopefully the transition won't be too
hard.
>
> My first question: How do I loop through a comma delimited list?
>
> ex: $mylist = "a,b,c,d,e,f,g";
>
> thanks for your time and patience,
>
> Greg
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>