I'm pulling two arrays from my database. One of them is from the friends
table, and the other is from the members
table.
What I'm trying to do is display the usernames of the friends on the profile. That's done, but now I'm trying to make links to the person who has that username's profile (click on userName to go to userName's profile). The friends array ($friendsarr) has all of the ID's of the friends, and the username array ($friendunamearr) has the usernames that match the ID's. However, they are not in the same order.
If I forgot to mention earlier, the members table has an ID field. That's how I'm pulling all of the usernames.
For example, let's say there's user1 and user2. User1's ID is 1. User2's ID is 2. When I click on the link to User1's profile, it takes me to User2's profile, and vice versa.
Is there a way to put them in the same order?