Can someone help me out. I have an array that has variables that are being filled by a database call. I can't figure out how to use the while loop and assign a different set up values to the variables and fill up the array with the results. Here is the code.
$db = mysql_connect(localhost, rideatl, 7777777);
mysql_select_db(ride,$db);
$sql="SELECT * FROM guestlist";
$result=mysql_query($sql, $db);
$num = mysql_num_rows($result);
$cur = 1;
while ($num >= $cur){
$row = mysql_fetch_array($result);
$guest_id = $row[guest_id];
$f_name = $row[f_name];
$l_name = $row[l_name];
$phone= $row[phone];
$street= $row[street];
$city=$row[city];
$state=$row[state];
$zip=$row[zip];
$email=$row[email];
$dob=$row[dob];
$male=$row[male];
$female=$row[female];
$company_name=$row[company_name];
$profession=$row[profession];
$website=$row[website];
$info=array(1=>array('line1'=>$f_name." ".$l_name, 'line2'=>$street, 'line3'=>'', 'line4'=>$city." ".$state." ".$zip),
2=>array('line1'=>'Bill Gates', 'line2'=>'456 Money Way', 'line4'=>'Seattle, WA 16456'),
3=>array('line1'=>'Steve Jobs', 'line2'=>'1 Inifinite Loop', 'line4'=>'Cupertino, CA 42389'));
reset($info); ## just to be sure
$cur++;}