Re: traverse a multidimensional array
| From: | Lez Lytollis | Date: | Thu, 20 Jul 2000 14:22:27 +0000 |
| Subject: | Re: traverse a multidimensional array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7419@lists.php.net to get a copy of this message | ||
OK, thanks, Chris, good of you to answer - a classic case of RTFM from me
there!
It occurred to me though, is there a way to recurse through the structure if
the dimensions are not known?
> > > How do I list the contents of each "second level" array? (not
> > > sure of the correct terms)
> > Same as you did the first:
> > while(list($key,$value)=each($arrResult)) {
> > echo "array[$key]=$value<br>\n";
> > while( list( $key2, $value2 ) = each( $value )) {
> > echo "$key2 = $value2<br>\n";