Forum Moderators: coopster
and tried:
for ($i = 0; $i <= count($pids); $i++) {
//echo $pids[$i];
$query = "SELECT byear, sex FROM demography WHERE pid='$pids[$i]'";
$result= mysql_query($query);
while($row = mysql_fetch_array($result))
{
//echo $row['byear']." ".$row['sex'];
echo "<br>";
}
}
which does not work - it gives me only one result for the first field in the array. however it works if i define the array in the script without the explode:
$pids1 = array("d3ecf7f3265b", "2e714bd65311", "16c60bd98f33", "ac06524701e7");
the following print commands:
print_r($pids);
print_r($pids1);
show me the same arrays.
is there a difference i can not see through the print commands?
thanks
m