Re: Array question
| From: | Bas Jobsen | Date: | Wed, 14 Aug 2002 18:54:18 +0000 |
| Subject: | Re: Array question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112592@lists.php.net to get a copy of this message | ||
> How can I echo the name of the of the second array (subArray)? The name
for value
<?php
$test=array (
'a'=>array('1','2'.'3'),
'c'=>array('6','5'.'4'),
'd'=>array('8','9'.'10'),
);
$r=next($test);
echo $r[0].' or :'."\n";
foreach (next($test) as $value) echo $value;
?>
or do you need the keys?
something like:
echo implode(",",array_keys(next($test)));