I've been studying php a short time so I did not understand the structure of the loops correctly as while and foreach would like someone to explain to me why this while does not display anything, and when I try to use foreach of the error. Thanks in advance for your understanding and patience.
<div id="resultado">
<table width="100%">
<thead>
<tr align="center">
<th align="center"class="filter-match" data-placeholder="">ID|</th>
<th align="center"class="filter-match" data-placeholder="">|Cliente|</th>
<th align="center"class="filter-match" data-placeholder="">|Data Retorno|</th>
<th align="center" data-placeholder="">|Nome do Contato|</th>
<th height="24" data-placeholder="">|Assunto</th>
</tr>
</thead>
</div>
<tbody>
<tr align="center" >
<?php
$acompanhamento = mysql_query("SELECT id_cliente, cliente_nome, data_ret, nome, mensagem FROM acompanhamento
WHERE data_ret = '".date('Y-m-d')."' ");
while ($exibe = mysql_fetch_array($acompanhamento)){
echo
$exibe["id_cliente"];
$exibe["nome"];
$exibe["mensagem"];
$exibe["cliente_nome"];
$exibe["data_ret"];
};
echo $id_cliente;
$cliente_nome;
$data_ret;
$nome;
$mensagem;
?>
</tr>
</tbody>
</table>
//--------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------
<div id="resultado">
<table width="100%">
<thead>
<tr align="center">
<th align="center"class="filter-match" data-placeholder="">ID|</th>
<th align="center"class="filter-match" data-placeholder="">|Cliente|</th>
<th align="center"class="filter-match" data-placeholder="">|Data Retorno|</th>
<th align="center" data-placeholder="">|Nome do Contato|</th>
<th height="24" data-placeholder="">|Assunto</th>
</tr>
</thead>
</div>
<tbody>
<tr align="center" >
<?php
$acompanhamento = mysql_query("SELECT id_cliente, cliente_nome, data_ret, nome, mensagem FROM acompanhamento
WHERE data_ret = '".date('Y-m-d')."' ");
$exibe = mysql_fetch_array($acompanhamento)
foreach mysql_fetch_array($acompanhamento) as $value)
{
echo
$exibe["id_cliente"];
$exibe["nome"];
$exibe["mensagem"];
$exibe["cliente_nome"];
$exibe["data_ret"];
};
echo $id_cliente;
$cliente_nome;
$data_ret;
$nome;
$mensagem;
?>
</tr>
</tbody>
</table>