Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/12/2010, 07:58
karis_fibbo
 
Fecha de Ingreso: febrero-2009
Mensajes: 47
Antigüedad: 15 años, 2 meses
Puntos: 2
TCPDF Y Variables PHP

Hola BUen Dia...
Necesito de su ayuda he realizado un pdf con TCPDF , pero no encuentro la manera de ke me imprima variables de php (consulta de base de datos, $_SESSION y demas).

Este es parte del codigo... Les agradeceria su ayuda.

$html .='<span class="encabezado_tabla4"><?php echo $_SESSION["fecha4"]; ?></span></div></td>
</tr>
</table></td>
<td width="420" ><br />
<br />
<table width="389" border="0" cellspacing="0">
<tr>
<td width="387"><table width="380" border="1" align="left" cellpadding="0" cellspacing="0" class="estilotabla">
<tr>
<td width="174" height="15"><div align="center" class="encabezado_tabla4">CONCEPTO</div></td>
<td width="200"><div align="center" class="encabezado_tabla4">VALOR</div></td>
</tr>
<tr>
<td class="textommPequeno" height="15">MATRICULA</td>
<td class="encabezado_tabla4"><div align="right">'.$registro["ordinaria"].'
</div></td>
</tr>
<tr>
<td height="15">&nbsp;</td>
<td class="encabezado_tabla4">$</td>
</tr>
<tr>
<td height="15">&nbsp;</td>
<td class="encabezado_tabla4">$</td>
</tr>
<tr>
<td height="15">&nbsp;</td>
<td class="encabezado_tabla4">$</td>
</tr>
<tr>
<td height="15">&nbsp;</td>
<td class="encabezado_tabla4">$</td>
</tr>
</table></td>
</tr>
<tr>
<td><p>&nbsp;</p>
<table width="380" border="1" align="left" cellpadding="0" cellspacing="0" class="estilotabla">
<tr>
<td width="114" height="15"><div align="center" class="encabezado_tabla4">MODALIDAD</div></td>
<td width="131"><div align="center" class="encabezado_tabla4">FECHA MAX. PAGO</div></td>
<td width="127"><div align="center" class="encabezado_tabla4">VALOR 1</div></td>
</tr>
<tr>
<td height="15" class="textommPequeno">FECHA 1</td>
<td class="textommPequeno"><div align="right">
&nbsp;<?php $dia = substr($registro["fecha1"],0,2); $mes = substr($registro["fecha1"],2,2); $anio = substr($registro["fecha1"],4,4); echo $anio.".".$mes.".".$dia; ?>
</div></td>
<td class="encabezado_tabla4"><div align="right">$
&nbsp;<?php if($_SESSION["institucion"]==2){$num=number_format($registro["ordinaria"] ,0 , "," ,"."); echo $num;}else{$num=number_format($registro["ordinaria1"] ,0 , "," ,"."); echo $num;} ?>
</div></td>
</tr>
<tr>
<td height="15" class="textommPequeno">FECHA 2</td>
<td class="textommPequeno"><div align="right">
&nbsp;<?php $dia = substr($registro["fecha2"],0,2); $mes = substr($registro["fecha2"],2,2); $anio = substr($registro["fecha2"],4,4); echo $anio.".".$mes.".".$dia; ?>
</div></td>
<td class="encabezado_tabla4"><div align="right">$
&nbsp; <?php if($_SESSION["institucion"]==2){$num=number_format($registro["ordinaria1"] ,0 , "," ,"."); echo $num;}else{$num=number_format($registro["ordinaria"] ,0 , "," ,"."); echo $num;} ?>
</div></td>
</tr>
<tr>
<td height="15" class="textommPequeno">FECHA 3</td>
<td class="textommPequeno"><div align="right">
&nbsp;<?php $dia = substr($registro["fecha3"],0,2); $mes = substr($registro["fecha3"],2,2); $anio = substr($registro["fecha3"],4,4); echo $anio.".".$mes.".".$dia; ?>
</div></td>
<td class="encabezado_tabla4"><div align="right">$
&nbsp;<?php $num=number_format($registro["extraordinaria"] ,0 , "," ,"."); echo $num; ?>
</div></td>
</tr>
<tr>
<td height="15" class="textommPequeno">FECHA 4 </td>
<td class="textommPequeno"><div align="right">
&nbsp;<?php $dia = substr($registro["fecha4"],0,2); $mes = substr($registro["fecha4"],2,2); $anio = substr($registro["fecha4"],4,4); echo $anio.".".$mes.".".$dia; ?>
</div></td>
<td class="encabezado_tabla4"><div align="right">$
&nbsp;<?php $num=number_format($registro["extraordinaria1"] ,0 , "," ,"."); echo $num; ?>
</div></td>
</tr>
<tr>
<td colspan="3" height="25" class="textommPequeno">OBSERVACIONES: <?php echo $registro["observaciones"]; ?><br /></td>
</tr>
</table>&nbsp;</td>
</tr>
</table>


</td>
</tr>
</table>
<br><br>';