On Tuesday 19 March 2002 03:44, Mullin, Reginald wrote: > I've just added another record to the table. Now they're a total of 3 > records matching the "WHERE emp_id='$emp_login_id" criteria. When I > "print_r(array_values($emp_login_grp_id));" I get the following values: > Array ( [0] => 222 [1] => 333 ). For some reason, it seems to be skipping > the first record.
I don't know what the status of your code is now. But you're probably doing: // read the first record $employee_2 = mysql_fetch_array($result_2); ... ... ... if ($employee_2){ $emp_login_wkgrp_id = array(); $emp_login_grp_id = array(); $emp_login_role_id = array(); $i = 0; // reading the rest of the records while($employee_2 = mysql_fetch_array($result_2)){ $emp_login_wkgrp_id[$i] = $employee_2["wkgrp_id"]; $emp_login_grp_id[$i] = $employee_2["grp_id"]; $emp_login_role_id[$i] = $employee_2["role_id"]; $i++; } Thus your first record is 'lost' (not displayed) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Why would anyone want to be called "Later"? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php