一个更好的短代码[关闭]

I wonder if there is a shorter code for the following to get the same results:

$query      = "SELECT * FROM `test` ORDER BY `id`";
$run        = mysqli_query($link, $query);
$prepare    = mysqli_prepare($link, $query);
$execute    = mysqli_stmt_execute($prepare);
$store      = mysqli_stmt_store_result($prepare);
$row        = mysqli_stmt_num_rows($prepare);
while($row = mysqli_fetch_assoc($run))
{
    $id = $row['id'];
    $name   = $row['name'];
    $phone  = $row['phone'];        
    $email  = $row['email'];
//  .
//  .
//  .
//  .
//  etc code
}

Please if you know better or shorter way, post it as a reply..

Thanks in advance

Provided you don't use any of those variables anywhere else then you can simplify this to:

$query      = "SELECT * FROM `test` ORDER BY `id`";
$run        = mysqli_query($link, $query);
while($row = mysqli_fetch_assoc($run))
{
    //Code
}