1

Hi,

At first time sorry if I don't write correctly in english but I'm using a translator...

I have a project to make a PDF document of catalog pictures from my web page, the idea is make a array of pictures for example in a boxes with 200x200 px. from left to right and when I arrive to 3 boxes, close the line, as <br/> in html and follow with the array at below line.
I'm working around one week with this with some results, but to finish the work. I have the next code that run well at web page in php, but when make the PDF I get a error.
<table cellpadding="2" cellspacing="6" id="tabla" align="center"> <?php $cols_gen = 1; while( $resultado = mysqli_fetch_array($sql_seleccion) ) { $image = $url.$resultado['ruta']; $thumb = $url.$resultado['thumb']; $datos = exif_read_data($url_local.$resultado['ruta'], 0, true); $exif = $datos['WINXP']['Comments']; $comentario_medida= $resultado['medida']; $comentario_pase= $resultado['pase']; if($cols_gen == 1) { echo "<tr>"; } ?> <td> <div id="contenido"> <img id="imagen" src="<?php echo $thumb;?>"> <div style="width: 180px;line-height: 20px; text-align:left;border-top-width: 1px;border-top-style: solid;border-top-color: #FF0000;padding: 8px 0px 10px 10px; margin:auto; margin-top:10px;"> b>referencia:</b> <?php echo $resultado['referencia']; ?> <br> <?php if($comentario_pase) {echo "<b>pase (mm):</b> $comentario_pase<br>"; } ?> <?php if($comentario_medida) {echo "<b>medida (mm):</b> $comentario_medida<br>"; } ?> <b>material:</b> <?php echo $resultado['material']; ?> <br> <?php if($exif){ echo "<b>comentarios:</b><br>$exif"; }?> </div> </div> </td> <?php if($cols_gen == 3) { echo "</tr>"; $cols_gen == 0; } $cols_gen++; } mysqli_free_result($sql_seleccion); ?> </table>


And the error that I get is:

ERROR n°4
Fichero : ..\_class\parsingHtml.class.php
Línea : 119

Código HTML no válido, las etiquetas no estan cerradas en el orden correcto.
Estado :

Array
(
[0] => table
[1] => tr
)



HTML : ...</table>...



If I delete the table from code, all work fine. The array work correctly, the problem arrive when I write the code "if($cols_gen == 1) {
echo "<tr>"; }"


Any idea?


Thanks in advance!!!!!!!!