how can i add result of multiple queries in a single array so it makes it easier to later output.
for example,
$newArray = array("mike", "john");
while ($newArray !== false){
$sql = "Select * from accounts where name = '$newArray'";
$result = mysqli_query($db_connection,$sql);
}
while ($row = mysqli_fetch_assoc($result)) {
printf $row['firstName'];
echo "----";
printf $row['num_accounts'];
echo "----";
prinf $row['location'];
echo "----";
echo "<br>";
}
i am sure i am missing something that obvious. but the idea is that i want to setup a loop to read from an array and then execute the query and store the results. each time query executes the condition is different but from same table, , but then keep adding the results to single output, making it easier to output in the end.