Re: Array asociativo

From: Date: Thu, 13 Nov 2003 16:31:53 +0000
Subject: Re: Array asociativo
References: 1 2  Groups: php.general.es 
Request: Send a blank email to general-es+get-42543@lists.php.net to get a copy of this message
puede que esto te esté afectando <input type="hidden" name="IDtit["121"][] value="1"> no debería ser así? <input type="hidden" name="IDtit['121'][]" value="1"> o <input type="hidden" name='IDtit["121"][]' value="1"> "Jorge vásquez" <jvasquez@smarketing.com.sv> escribió en el mensaje news:00e801c3a971$31aa7880$01264309@server... > Upppppp.. perdon.. habia un error en los checkbox, aqui estan los correctos > <input type="checkbox" name="cuenta[]" value="121"> > <input type="hidden" name="IDtit["121"][] value="1"> > <input type="checkbox" name="cuenta[]" value="122"> > <input type="hidden" name="IDtit["122"][] value="1"> > <input type="checkbox" name="cuenta[]" value="121"> > <input type="hidden" name="IDtit["121"][] value="2"> > <input type="checkbox" name="cuenta[]" value="122"> > <input type="hidden" name="IDtit["122"][] value="2"> > > Para recorrer la cuenta lo hago de la siguiente forma: > for($i=0;$i<sizeof($cuenta);$i++) > { > echo $cuenta[$i]."<br>"; > } > El problema resulta cuando quiero recorrer el IDtit, si utilizo $i como > indice no me funciona porque $i vale 4 y el indice de $IDtit es solamente 2. > > Gracias por su ayuda. >

« previous php.general.es (#42543) next »