If I reach the problem, you asking how to work with many objects?
So, if you use the array of object, for example, from ORM.
$users_list = new Users();
$arr_users = $users_list->all();
In $arr_users you will have an array with many users objects from your DB.
Every object have some properties, for example - id, name, gender and age.
foreach($arr_users as $single_user) {
echo $single_user->id;
echo $single_user->name;
echo $single_user->gender;
echo $single_user->age;
}
If you need just one user:
echo $arr_users[1]->name;
Also you can work with array of objects like this.
Firstly, made new array from $arr_users;
foreach($arr_users as $single_user){
$arr_user_by_id[$single_user->id] = $single_user;
}
Now you have new array, where keys are user id, and value - object user.
So you can get user info by his ID.
echo $arr_users[$_GET['uid']]->name;
I hope I could help a little bit to understand.