Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/07/2011, 22:40
experimenta
 
Fecha de Ingreso: abril-2010
Mensajes: 159
Antigüedad: 14 años
Puntos: 11
Respuesta: Bucle For - Necesito Mejorar el codigo

Creo que asi si llegaria hasta el 80 :D
Código PHP:
<link rel="stylesheet" type="text/css" href="css/modulos.css"/>
<?PHP 
set_time_limit
(0);
$prefijo="nombreset";
for(
$numero=0;$numero <80;$numero++){
echo 
"
<body oncontextmenu='return false'>
<table width='200' border='0' align='center'><tr>
<td><table bordercolor='#999999' height='145' cellspacing='0' width='517' border='1'><tbody><tr bgcolor='#999999'>
<td height='23' colspan='4' bgcolor='#333333' style='background-image: url(images/tablebg.png);'>
<div align='center' style='nombreset'>Set ${"nombreset".$numero}</div></td></tr></tbody><tr>
<td width='32' height='138' rowspan='5'><img src='$imagen' alt=''></td>
<td width='363' height='29'><center>Personajes: $personajes</center></td>     
<td width='108' height='29' rowspan ='1' class='precio' style='background-image: url(images/tablebg.png); background-repeat:inherit;'>Precio</td></tr><tr>
<td width='363' height='32'><center>Opciones Disponibles: $opciones</center></td>
<td width='108' height='32' rowspan='2' ><div><center>AR$: Pesos Argentinos</center></div><div><center>USD: D&oacute;lares</center></div></td></tr> <tr>
<td width='363' height='36'><center>Partes: $partes</center></td></tr><tr>
<td width='363' height='23' style='background-image: url(images/tablebg.png);'><center>Set ${"nombreset".$numero} Completo</center></td>
<td width='108' height='23' style='background-image: url(images/tablebg.png);'><center>$precio</center></td></tr> <tr></tr><tr></tr></table> </td></tr></table>"
;}
Echo
"<table width='519' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='352'>$leyenda</td></tr></table>";${$prefijo.$numero}= "$numero";
?>