i am currently running a while loop on a database.
while($show_a = mysql_fetch_array($show_approval)){
$s_id = $show_a['userid'];
$s_type = $show_a['type'];
$s_dateleave = $show_a['dateleave'];
$s_datereturn = $show_a['datereturn'];
$s_timeleave = $show_a['timeleave'];
$s_timereturn = $show_a['timereturn'];
$s_reason = $show_a['reason'];
$s_approval = $show_a['approved'];
}
this works fine except for one thing. i would like to only display the $s_id variable only once, each time it changes.
for example.
userid A
the list of
things would
show up
here.
userid B
the list of
things for this
userid would show up
here.
and so on. with the loop i have currently i get the userid with each query.
do i need to switch to a different kind of loop to get what i am looking for?
thanks in advance.
chris