Jejej yo de nuevo molestando por el foro, pero nose que sucede
esta matriz multidimencional funciona bien con 1 valor, cuando ingreso 3 o mas valores solo me imprime el ultimo valor, el resto me los muestra como errores de lineas, aqui un ejemplo de lo que me imprime
Notice: Undefined offset: 0 in C:\xampp\htdocs\agsiscom\oferts.php on line 46
bueno aqui el code. y no puede ser por la consulta, por k la ejecute en phpmyadmin y me dio perfectamente.
<?php
include ('adm/conexion.php');
$link=conectarse();
$rs=mysql_query("SELECT * FROM items WHERE oferta='Si' AND estado='Disponible' ORDER BY fechaoferta DESC LIMIT 6"); $msg=NULL;
$idx=0;
if ($rs) {
$idx=>array('cod'=>trim($row['codigo']),
"img"=>trim($row['imgurl']),
"dc"=>trim($row['descuento']),
"title"=>trim($row['search']),
"val"=>trim($row['valor'])
)
);
$idx++;
}
} else { $msg="Actualmente no hay Ofertas de productos."; }
?>
bueno y aqui el code que uso para imprimirla...
<? if ($msg!=NULL) { echo $msg; exit(); }?> <table width="578" height="295" border="0" cellpadding="1">
<tr>
<td width="180" style="color:#00F; font-style:italic"><b><? echo $datos[0]['title']; ?></b></td>
<td width="180" style="color:#00F; font-style:italic"><b><? echo $datos[1]['title']; ?></b></td>
<td width="180" style="color:#00F; font-style:italic"><b><? echo $datos[2]['title']; ?></b></td>
</tr>
<tr>
<td height="180"><img src="<? echo $datos[0]['img']; ?>" width="180" height="180"></td>
<td height="180"><img src="<? echo $datos[1]['img']; ?>" width="180" height="180"></td>
<td height="180"><img src="<? echo $datos[2]['img']; ?>" width="180" height="180"></td>
</tr>
<tr>
<td height="76"><b><font size="-1">
Codigo: <? echo $datos[0]['cod']; ?><br/>
Valor $: <? echo $datos[0]['val']; ?><br/>
Descuento: <? echo $datos[0]['dc']; ?> %<br/></font><font color="#FF0000" style="font-style:oblique">
Precio $: <? echo ($datos[0]['val']-($datos[0]['val']*($datos[0]['dc']/100))); ?></font></b></td>
<td height="76"><b><font size="-1">
Codigo: <? echo $datos[1]['cod']; ?><br/>
Valor $: <? echo $datos[1]['val']; ?><br/>
Descuento: <? echo $datos[1]['dc']; ?> %<br/></font><font color="#FF0000" style="font-style:oblique">
Precio $: <? echo ($datos[1]['val']-($datos[1]['val']*($datos[1]['dc']/100))); ?></font></b></td>
<td heigth="76"><b><font size="-1">
Codigo: <? echo $datos[2]['cod']; ?><br/>
Valor $: <? echo $datos[2]['val']; ?><br/>
Descuento: <? echo $datos[2]['dc']; ?> %<br/></font><font color="#FF0000" style="font-style:oblique">
Precio $: <? echo ($datos[2]['val']-($datos[2]['val']*($datos[2]['dc']/100))); ?></font></b></td>
</tr>
<tr>
<td><input type="submit" class="button3" value="Ver mas" style="float:right" onClick="showitem.php?cod='<? echo $datos[0]['codigo']?>'"><hr color="#000099" size="1px"/></td>
<td><input type="submit" class="button3" value="Ver mas" style="float:right" onClick="showitem.php?cod='<? echo $datos[1]['codigo']?>'"><hr color="#000099" size="1px"/></td>
<td><input type="submit" class="button3" value="Ver mas" style="float:right" onClick="showitem.php?cod='<? echo $datos[2]['codigo']?>'"><hr color="#000099" size="1px"/></td>
</tr>
</table>
por fa colaboracion...