If I do this kind of query:
<?php
SELECT * FROMloginwhereemail = 'something@something.com';
$result = mysqli_query($connection, $query) or die("Query error");
while ($row = mysqli_fetch_array($result)) {
$id = $row['id'];
$email = $row['email'];
$first_name = $row['first_name'];
//(......)
}
?>
is there a way that the MySQL result can be with different variable names? I mean:
SELECT (first_name as foo) FROM login where email = 'something@something.com';
$first_name = $row['foo'];