Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/02/2014, 15:08
ocp001a
Colaborador
 
Fecha de Ingreso: mayo-2008
Ubicación: $MX['VZ']['Xalapa']
Mensajes: 3.005
Antigüedad: 16 años
Puntos: 528
Respuesta: echo con php problema

Debes aprender a usar las comillas dobles y sencillas.

Por la forma en que lo haces

echo '<p>&nbsp;</p>
<table id="tablacont" width="100%" border="1">
<tr>
<td colspan="2"> <div align="center"><strong>. : INFORMACION : .</strong></div></td>
</tr>
<tr>
<td width="40%"><div align="center">
<p><img src="http://www.forosdelweb.com/Imagenes/matutino.png" width="108" height="122" /></p>
</div></td>
<td width="60%"><div align="center"><a href="http://www.forosdelweb.com/Recursos/<?php echo $kardexMat ?>[/COLOR][/B]"><img src="http://www.forosdelweb.com/Imagenes/kardex.png" width="125" height="111" /></a></div></td>
';

Las comillas simples no interpretan variables, así que hay que concatenar o no usar echo para todo el html.

esta es una alternativa:

echo '<p>&nbsp;</p>
<table id="tablacont" width="100%" border="1">
<tr>
<td colspan="2"> <div align="center"><strong>. : INFORMACION : .</strong></div></td>
</tr>
<tr>
<td width="40%"><div align="center">
<p><img src="http://www.forosdelweb.com/Imagenes/matutino.png" width="108" height="122" /></p>
</div></td>
<td width="60%"><div align="center"><a href="http://www.forosdelweb.com/Recursos/'.$kardexMat.'[/COLOR][/B]"><img src="http://www.forosdelweb.com/Imagenes/kardex.png" width="125" height="111" /></a></div></td>'; //Se usó concatenación con puntos.



o bien


<p>&nbsp;</p>
<table id="tablacont" width="100%" border="1">
<tr>
<td colspan="2"> <div align="center"><strong>. : INFORMACION : .</strong></div></td>
</tr>
<tr>
<td width="40%"><div align="center">
<p><img src="http://www.forosdelweb.com/Imagenes/matutino.png" width="108" height="122" /></p>
</div></td>
<td width="60%"><div align="center"><a href="http://www.forosdelweb.com/Recursos/<?php echo $kardexMat ?>[/COLOR][/B]"><img src="http://www.forosdelweb.com/Imagenes/kardex.png" width="125" height="111" /></a></div></td>

Nota que no coloqué el echo al inicio del texto