while ($line = @mysql_fetch_array($result)) {
$X=$line['lastname'];
$Y=$line['lastnameid'];
$namesreturned[$Y]="<p>$X</p>";
}
how do i reference the numerical value (the $Y) in the code?
i.e. if i want to do the following:
$amount=count($namesreturned);
if ($amount==0){echo "<p>nothing to return!</p>";}
else {echo "<h2>There are $numr results listed below: </h2>";
$z=0;
while ($z<=$amount){
echo "<a href=\"http://www.xxx.com/index.php?name=$Y\">".$namesreturned[$z]."</a>";
$x++;
}
(reference the ((Key)) $Y)
Thanks!
$X=$line['lastname'];
$Y=$line['lastnameid'];
$namesreturned[$Y]="<p>$X</p>";
}
how do i reference the numerical value (the $Y) in the code?
i.e. if i want to do the following:
$amount=count($namesreturned);
if ($amount==0){echo "<p>nothing to return!</p>";}
else {echo "<h2>There are $numr results listed below: </h2>";
$z=0;
while ($z<=$amount){
echo "<a href=\"http://www.xxx.com/index.php?name=$Y\">".$namesreturned[$z]."</a>";
$x++;
}
(reference the ((Key)) $Y)
Thanks!
Last edited:















