Im working in a webpage that we can store news, and i have a code that creates a word file with three tables with data from database, the problem is that i want them ordered by a specific order. The code is above.
[php]<?php
include(“auth.php”); //include auth.php file on all secure pages
require(‘db.php’);
error_reporting(0);
if(isset($_POST[‘chk’])=="")
{
?>
<?php
}
$chk = $_POST[‘chk’];
$chkcount = count($chk);
?>

Análise Diária de Noticias <?php setlocale(LC_TIME,"portuguese"); echo strftime("%d de %B de %Y"); ?> Segurança & Defesa <?PHP HEADER("Content-Type: application/msword"); HEADER("Content-Disposition: attachment; filename=ADN.doc"); HEADER("Pragma: no-cache"); HEADER("Expires: 0"); for($i=0; $i<$chkcount; $i++){ $id = $chk[$i]; $res=$con->query("SELECT * FROM teste1 WHERE id='$id'"); while($row=$res->fetch_array()) { if ($row['categoria'] == 'Destaque'){ echo "
Destaque | "; echo "
---|
"; echo "
Criminalidade | "; echo "
---|
"; echo "
Gerais | "; echo "
---|