Tema: php a html
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/08/2011, 14:36
msx
 
Fecha de Ingreso: julio-2011
Mensajes: 21
Antigüedad: 12 años, 9 meses
Puntos: 0
php a html

Estimados , bueno a medida que he ido programando y cambiando variables descubierto q tengo complicaciones para pasar de php con echos a html

tengo el siguiente codigo en php y me gustaria si me pueden ayudar a transformar el codigo en negrita para luego añadir los estilos, y si no es mucho pedir que me ayuden en la logica para transformarlo y asi poder aprender :) Gracias
lo en cursiva es mi intento de transformacion . y lo negrita es lo original


Código PHP:
<html> 
<head> 
<title>Noticias</title> 
 <meta name="tipo_contenido"  content="text/html;" http-equiv="content-type" charset="utf-8">

<?php
$connect
=mysql_connect("localhost","root",""); 

mysql_select_db("mascotas",$connect); 

$result=mysql_query("select * from noticias order by fecha Desc"$connect); 
$totalregistros=mysql_num_rows($result); 
$result2=mysql_query("select * from comentarios where id",$connect);
$totalcomentarios=mysql_num_rows($result2);
?> 
</head> 
<body> 

<?php

while($row=mysql_fetch_array($result))
{
$result2=mysql_query("select * from comentarios where id='".$row[id_noticia]."'",$connect);
$totalcomentarios=mysql_num_rows($result2);

[
B]//echo '<h3>'.$row[titulo].'</h3>'.'<br/>'.$row[articulo].''.$row[autor].' | '.$row[categoria].' | '.$row[fecha].'<br/>'.'<br/>'.$row[noticia].' <br>';[/B]

[I]?> <h3><?php $row['titulo']?></h3><br/><?php $row['articulo']?> <?php $row['autor'?><?php $row['categoria'?><?php $row['fecha'?><br/>
<br/><?php $row['noticia']?>[/I]


<?php
}
mysql_free_result($result)
?> 
</body> 
</html>