Re: [PHP] count() & numerical arrays....

2003-09-09 Thread Curt Zirzow
* Thus wrote CF High ([EMAIL PROTECTED]): > Hey all. > > Another simple, yet baffling for me, question: > > I have a comma delimited list of numbers; e.g. $num_list = "1,2,3,4" > > I split the number list to array -- $num_list_array = split("," $num_list) > > I then count the number of elements

Re: [PHP] count() & numerical arrays....

2003-09-09 Thread Brad Pauly
CF High wrote: I split the number list to array -- $num_list_array = split("," $num_list) Any ideas? split uses a regular expression. I think you want to use explode here. $num_list_array = explode(',', $num_list) - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] count() & numerical arrays....

2003-09-09 Thread Cesar Cordovez
Use explode instead... $num_list_array = explode("," $num_list) more information at php.net/explode Cesar CF High wrote: Hey all. Another simple, yet baffling for me, question: I have a comma delimited list of numbers; e.g. $num_list = "1,2,3,4" I split the number list to array -- $num_list_

[PHP] count() & numerical arrays....

2003-09-09 Thread CF High
Hey all. Another simple, yet baffling for me, question: I have a comma delimited list of numbers; e.g. $num_list = "1,2,3,4" I split the number list to array -- $num_list_array = split("," $num_list) I then count the number of elements -- $count = count($num_list_array); I do not get 4 for $co