Foros del Web » Programando para Internet » PHP »

cierre if

Estas en el tema de cierre if en el foro de PHP en Foros del Web. hola una pregunta cuandomiro esta pagina en el editor del dreamwever se ve barbaro pero cuando la subo al sitio se me desarma todo creo ...
  #1 (permalink)  
Antiguo 18/07/2008, 10:21
 
Fecha de Ingreso: abril-2007
Mensajes: 59
Antigüedad: 17 años
Puntos: 0
cierre if

hola
una pregunta
cuandomiro esta pagina en el editor del dreamwever se ve barbaro pero cuando la subo al sitio se me desarma todo

creo que es por el cierre de los if pero creo estan bien,
me podrian asesorar???

Código PHP:

              <tr>
                <td align="left" valign="top">
                 <?
if($row_en_portada$bd->get_next_row()){
?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>                 
                    <td align="left" valign="top">                    
                 <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>                        
                      <? if ($row_en_portada['Foto_miniatura']!=''){?> 
                        <td width="98" align="left" valign="top"><img src="Images/Noticias/<?=$row_en_portada['Foto_miniatura']?>" width="98" height="98"></td>
                         <?
                         
} else{
                         
?> 
                          <td width="98" align="left" valign="top"><img src="Images/Noticias/nodisp.JPG" width="98" height="98"></td>
                        <?
                        
}
                        
?>  <td width="10" align="left" valign="top"><img src="Images/1px.gif" width="10" height="10"></td>
                          <td align="left" valign="top"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="20" align="left" valign="top" class="Tit_Fecha"> <?=$row_en_portada['fecha']?></td>
                              </tr>
                              <tr>
                                <td align="left" width="100" valign="top" class="Copete"><?=$row_en_portada['titulo']?> </td>
                              </tr>
                              <tr>
                                <td height="18" align="left" valign="top"><img src="Images/Ico_vernota.jpg" width="13" height="9"><a href="noticia.php?id=<?=$row_en_portada['id']?>&<?=$get_vars_fecha?>" class="Link_Rojo">ver nota completa</a></td>
                              </tr>
                              <tr>
                                <td height="18" align="left" valign="top"><a href="noticiasanteriores2.php" class="Link_Rojo">ver noticias anteriores</a></td>
                              </tr>
                          </table></td>                          
                        </tr>                        
                    </table>
                    <?
}
?>
                    </td>
                    
                    
     <?
if($row_en_portada$bd->get_next_row()){
?>
                    <td width="28" align="left" valign="top" background="Images/Div_vert.jpg"><img src="Images/1px.gif" width="28" height="28"></td>
                    <td align="left" valign="top"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                      <? if ($row_en_portada['Foto_miniatura']!=''){?> 
                        <td width="98" align="left" valign="top"><img src="Images/Noticias/<?=$row_en_portada['Foto_miniatura']?>" width="98" height="98"></td>
                         <?
                         
} else{
                         
?> 
                          <td width="98" align="left" valign="top"><img src="Images/Noticias/nodisp.JPG" width="98" height="98"></td>
                        <?
                        
}
                        
?>     <td width="10" align="left" valign="top"><img src="Images/1px.gif" width="10" height="10"></td>
                          <td align="left" valign="top"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="20" align="left" valign="top" class="Tit_Fecha"> <?=$row_en_portada['fecha']?></td>
                              </tr>
                              <tr>
                                <td align="left" width="100" valign="top" class="Copete"><?=$row_en_portada['titulo']?> </td>
                              </tr>
                               <tr>
                                <td height="18" align="left" valign="top"><img src="Images/Ico_vernota.jpg" width="13" height="9"><a href="noticia.php?id=<?=$row_en_portada['id']?>&<?=$get_vars_fecha?>" class="Link_Rojo">ver nota completa</a></td>
                              </tr>
                              <tr>
                                <td height="18" align="left" valign="top"><a href="noticiasanteriores.php" class="Link_Rojo">ver noticias anteriores</a></td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
                </table>
                 <?
}
?>
                </td>
                
              </tr>
si esta todo bien cerrado???
gracias
  #2 (permalink)  
Antiguo 18/07/2008, 10:23
Avatar de emiliodeg  
Fecha de Ingreso: septiembre-2005
Ubicación: Córdoba
Mensajes: 1.830
Antigüedad: 18 años, 7 meses
Puntos: 55
Respuesta: cierre if

aparentemente estan bien cerrados
__________________
Degiovanni Emilio
developtus.com
  #3 (permalink)  
Antiguo 18/07/2008, 11:10
Avatar de viqtor  
Fecha de Ingreso: noviembre-2007
Ubicación: Donde estoy?
Mensajes: 49
Antigüedad: 16 años, 5 meses
Puntos: 0
Respuesta: cierre if

Por que no metes las lineas de html asi
Cita:
echo '<td height="20" align="left" valign="top" class="Tit_Fecha"> .'$row_en_portada['fecha'].'</td>';
Y asi cierras el script php junto con el if
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:53.