I have a problem looping through a result set and putting the values into an array. I can either return the first or last record of about 600.
I know the $info array works because I can see the output, but only for one record. I hope I am not being completely thick about this.
Thank you in advance...
Cheers
<?
include ('db.php');
include ('class.label.php');
$labeltype="JCL20";//Av5160
$label = new Clabel($labeltype);
$result = mysql_query("SELECT first_name, last_name, str_address, suburb, city, post_code FROM member_roll ") or die ("mysql error");
while ($row = mysql_fetch_row($result)){
$fName = $row[0]; $lName = $row[1];
$str = $row[2]; $sub=$row[3];
$city=$row[4]; $pcode=$row[5];
$info = array($i=>array('line1'=>"$fName $lName",'line2'=>"$str", 'line3'=>"$sub",'line4'=>"$city $pcode"));
}
$label->makeLabel($info);
//reset($info); ## just to be sure
?>😕