Eduardo Fuerte
asked on
Error when using loop(s) with HTML tables and PHP
Hi Experts
I'm facing a problem when trying to use HTML tables in paginations with PHP.
Accordingly with the code.
The 1st page is good.
But when I go to the 2nd.
It's completelly disconfigured.
Any solution?
Thanks in advance!
I'm facing a problem when trying to use HTML tables in paginations with PHP.
Accordingly with the code.
<body>
<div id="container_principal">
<div class="row font">
<div class="col-md-12">
<h3>Publicações </h3><hr class="hr_titulos"/>
<?php
if (empty($resultadoPublicacoes))
{
echo 'No momento, não encontram-se cadastradas publicações. ';
}
echo "<ul class='media-list' id='publicacoes'>";
?>
<?php
foreach ($resultadoPublicacoes as $resultadoPublicacoes)
{
?>
<table class="tg">
<?php
$imagem = base_url($resultadoPublicacoes->imagem);
if ($resultadoPublicacoes->imagem == null)
{
$imagem = "http:placehold.it/90x120";
}
?>
<tr>
<td class="tg-031e" colspan="2" align = "left"> <?php echo "<h4 class='font'>"; echo ucfirst($resultadoPublicacoes->nome);?></td>
<td class="tg-031e" colspan="2" align = "right">Leia online</td>
</tr>
<tr>
<td class="tg-031e" rowspan="3">
<?php
// Imagem
echo "<a class='pull-left' href='";
echo base_url("cesanshome/carregando_arquivo/$idpublicacoes");
echo "'>";
echo "<img class='media-object' width='90px' height='120px' src='";
echo $imagem;
echo "'></a>
<div class='media-body' id='link_publicacoes'>" //
?>
<td class="tg-031e" colspan="2">
<?php echo nl2br($resultadoPublicacoes->conteudo) // Sinopse
?>
</td>
<td class="tg-yw4l" rowspan="3">
<?php
if (!is_null($resultadoPublicacoes->imagem_issuu))
{
// ISSUU
echo ('<div data-configid="');
echo (ucfirst($resultadoPublicacoes->imagem_issuu));
echo ('"');
echo ('style="width:270px; height:360px;"');
echo ('class="issuuembed"></div>');
echo '<script type="text/javascript" src="//e.issuu.com/embed.js" async="true"></script>"';
?>
</td>
</tr>
<tr>
<td class="tg-yw4l" colspan="2">Baixe o livro grátis</td>
</tr>
<tr>
<td class="tg-yw4l">PDF</td>
<td class="tg-yw4l">Ebook</td>
</tr>
</table>
<?php
}
}
echo "<br/> $paginacao";
?>
</ul>
</div>
</div>
</div>
</body>
</html>
The 1st page is good.
But when I go to the 2nd.
It's completelly disconfigured.
Any solution?
Thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!