In my code I made the end of it so that the array made a sequential sequence of my search but the same is not working, can anyone help me please?
<?php
error_reporting (E_ALL & ~ E_NOTICE & ~ E_DEPRECATED);
//chama o arquivo de conexão com o banco
include("connect_db.php");
//consulta mysqli
$query = mysql_query("SELECT numero, orig, dest, eqpt, rota FROM voos ORDER BY RAND() LIMIT 5") or die(mysql_error());
//aqui ele gera looping e cria um array com os campos da consulta
while($array = mysql_fetch_array($query))
{
echo $array['numero'];
?><br />
Origem: <?php
echo $array['orig'];
?><br />
Destino: <?php
echo $array['dest'];
?><br />
Aeronave:
<?php
echo $array['eqpt'];
?><br />
Rota: <?php
echo $array['rota'];
?><br /><?php
}
?>
$orig = $array->dest;
}
$dest = $orig;
}
<?php
?>