Array woes
I'm a newbie, working with php4.
I'm passing arrays from a form: a series of variables with the same
name like: Child[] and Age[]
I'm capturing them with:
$Child[] = array($_POST['Child[]']);
$Age[] = array($_POST['Age[]']) ;
then, I'm using:
<?php
$Count=0 ;
echo "<h3>Registering $numChildren Children</h3>" ;
do
{
echo "<p>$Child[$Count], Age $Age[$Count], $Gender[$Count]<p>" ;
echo "<p>Info: " . $Info[$Count] . "<p>" ;
$CheckEmpty = "$Child[$Count]" ;
$Count="$Count+1" ;
} while ($CheckEmpty!="") ;
if ($Count==1) echo "Not Applicable" ;
?>
However, I get this result on the page: (for 2 entries):
Array, Age Array, Array
Info: Array
, Age ,
Info:
In other words: the first set of values are replaced with "Array"
And the second set of values don't show up.
I also tried it with three sets, and the third set didn't register at all
Help? Thanks!
---
Descartes goes into a restaurant and orders a cup of coffee. He sits for a while, drinking his coffee and reading the paper. A little while later, the waitress comes by and asks him if he would like another cup. He says "I think not" and disappears...
|