Hi all
i have a small function that return an array. I need the function to return a 2 dimensional array
here is my code
$SQL = "select g.id, g.name,gu.user_id from groups g, groups_users gu where gu.user_id ='$user_id' and g.id = gu.group_id and g.channel_id ='$channel_id'";
$result = pg_exec($db_conn2,$SQL);
$num_rows = pg_numrows($result);
$row = 0;
while($row < $num_rows)
{
$data = pg_fetch_array($result,$row);
$my_group_id[] = $data[id];
$row++;
}
return $my_group_id;
i want the name of the group to also be returned.
How is this done
cheers
GM