$array = mysqli_fetch_array(mysqli_query($link,$result));
The code should do, what you want. Assuming the
$result, despite the strange name, is really an SQL query string.
But this way, you cannot release resources associated with the query results.
So this is more correct:
$result = mysqli_query($link, $query); $array = mysqli_fetch_array($result); // ... mysqli_free_result($result);