Simple one I think
| From: | Dave Carrera | Date: | Mon, 29 Mar 2004 16:39:02 +0000 |
| Subject: | Simple one I think | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181678@lists.php.net to get a copy of this message | ||
Hi List
Sorry for this basic one but my brains gone to sleep and I can t see it.
--- Problem example ----
$vocals = array(
"name" => array('Jonny Flash', 'Bill Banger', 'Sarah
Jane'),
"skill" => array('87', '77', 93),
"fee" => array('22000', '18500', '39000')
);
$i =0;
foreach($vocals as $val){
$rows .= "
<tr>
<td>$val[name][$i]</td><td>$val[skill][$i]</td><td>$val[fee][$i]</td>
</tr>
";
$i++;
}
echo $rows;
--- End ---
I get and output of [0][0][0][1][1][1][2][2][2] why ?
Thanks for any help
Dave C (of for a coffee and dreaming of bedtime) :-)
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.645 / Virus Database: 413 - Release Date: 28/03/2004