$q = "SELECT u.username, p.position FROM ".TBL_FOOT_TOUR_PLAYERS." p
INNER JOIN ".TBL_USERS." u ON p.userid = u.id
WHERE p.tourid = '$tour_id' ORDER BY position";
$result = $database->query($q);
while($row=mysql_fetch_assoc($result)){
}
I want to take both username and position and place them in an array.
I then want to be able to access that array every 2 entries.
How could I go about doing this?
Thanks
It sounds like you just want to do something like:
That will give the username/position for every two entries. However, that’s kind of weird. Instead you probably just want to do
This will give you an array like: