// transform string into an array
$arr = explode( ',', $mylist ) ;

// loop the array
foreach( $arr as $element )

Ignatius
____________________________________________
----- Original Message -----
From: "Gregory Lewis" <[EMAIL PROTECTED]>
To: "php-windows" <[EMAIL PROTECTED]>
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
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to