Re: [PHP] working on array of different number of indices

2001-05-16 Thread Chris Lee
Im not sure either what you mean. you want to know if a var is an array ? if (is_array($maybe_array)) if your looking for a way to transverse thought the array, use foreach() function work_on_array($value, $index) { if (is_array($index)) foreach($index as $pos => $val) $

Re: [PHP] working on array of different number of indices

2001-05-16 Thread Rasmus Lerdorf
On Wed, 16 May 2001, Dennis Gearon wrote: > I want to pass in a scalar int, or an array of ints (indices) to a > function in a class. The scalar or array will be a class variable. > > Without knowing the max size of each index, or the number of indices, > (as is required is most other languages),

[PHP] working on array of different number of indices

2001-05-16 Thread Dennis Gearon
I want to pass in a scalar int, or an array of ints (indices) to a function in a class. The scalar or array will be a class variable. Without knowing the max size of each index, or the number of indices, (as is required is most other languages), I can't figure out how to access the array in a fl