Doesn't matter how many times a user_id appears in table_one, I just need select any of their user_ids e.g select any of (user_id = 8 and user_id = 12) then get their names and age from table_two then add them into an array. Here are the tables:
table_one:
id user_id user_loves
1 8 Mango
2 5 Apple
3 1 Oranges
4 12 Toys
5 8 Guns
6 12 Bats
table_two:
id user_id name Age
1 8 David 19
2 5 Michael 24
3 12 Elsa 22
4 4 Greg 26
Get any of user_id = 8 AND user_id = 12; then fetch the corresponding names and age from table_two and populate the result into an accessible array like so:
$result = array();
firstname = $result[0][name];
second_age - $result[1][age];
So that my final answer is
firstname = David
secondName = Elsa
second_age = 22