Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/03/2011, 12:49
andoencombi
 
Fecha de Ingreso: febrero-2011
Mensajes: 195
Antigüedad: 13 años, 3 meses
Puntos: 1
Respuesta: ayuda porfavor amigos

me podrias decir como pongo el for este es lo que he hecho pero me imprime en columnas y no en una sola fila

Código PHP:
<?php

$bd_host 
"localhost"
$bd_usuario "root"
$bd_password ""
$bd_base "test"

$con mysql_connect($bd_host$bd_usuario$bd_password); 

mysql_select_db($bd_base$con); 

$i=0;
$sql=mysql_query("select COUNT(month(fecha)) from alguna where month(fecha) = $i",$con);


echo 
"<table border='1'>
  <tr>
  <td>Enero</td>
  <td>Febrero</td>
  <td>Marzo</td>
  <td>Abril</td>
  <td>Mayo</td>
  <td>Junio</td>
  <td>Julio</td>
  <td>Agosto</td>
  <td>Septiembre</td>
  <td>Octubre</td>
  <td>Noviembre</td>
  <td>Diciembre</td>
  </tr>\n"
;

for ( 
$i $i <= 12 $i ++) {
    echo 
"<tr>
    <td>$i</td>
    </tr> \n"
;
}
?>