En realidad, hiciste exactamente eso, agarraste el codigo que te dije y lo pusiste como estaba. Y no era eso lo que habia que hacer....
Ademas no prestaste atencion a los comentarios que puse en el codigo, pusiste un == donde va un %
Ytambien sacaste el $i++ al final!
Código PHP:
$i=0;
$color;
while($reg=mysql_fetch_array($datos)){
if($i o/o 2 == 0){
$color="#cccccc";
}else{
$color="#ffffff";
}
echo "<tr bgcolor='$color'>";
$costo_unitario=number_format($reg['costo_unitario'],2);
$importe=number_format($reg['importe'],2);
$c_sem1=number_format($reg['c_sem1'],2);
$i_sem1=number_format($reg['i_sem1'],2);
$c_est1=number_format($reg['c_est1'],2);
$i_est1=number_format($reg['i_est1'],2);
//echo "<td width=60 align=right > ".$reg["a_sem"]."</td>";
echo "<td width=60 align=right > ".$reg["numero"]."</td>";
echo "<td width=10 align=left > ".$reg["clave_con"]."</td>";
echo "<td width=550 align=left > ".$reg["conceptos"]."</td>";
echo "<td width=60 align=CENTER > ".$reg["unidades"]."</td>";
echo "<td width=80 align=right > ".$reg["cantidad"]."</td>";
echo "<td width=80 align=right >\$$costo_unitario</td>";
echo "<td width=80 align=right >\$$importe</td>";
//captura de datos reales
echo "<td width=80 align=right >\$$c_sem1</td>";
echo "<td width=80 align=right >\$$i_sem1</td>";
// acumulado estimado sem0 +sem1
echo "<td width=80 align=right >\$$c_sem1</td>";
echo "<td width=80 align=right >\$$i_sem1</td>";
// acumulado estimado c_sem-cantidad origen
echo "<td width=80 align=right >\$$c_est1</td>";
echo "<td width=80 align=right >\$$i_est1</td>";
#nunca cerrabas tr
echo "</tr>";
$i++;
}
ACLARO: el simbolo o/o reemplazalo por % (es un problema del resaltador de codigo del foro creo)
NOTA: gracias por el karma!