Re: Problem of a beginner with Array

From: Date: Wed, 21 Jul 2004 12:50:38 +0000
Subject: Re: Problem of a beginner with Array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191308@lists.php.net to get a copy of this message
Hello Torsten, > try this: > > input name="Grid1[1]" type"checkbox" file://1st > grid, 1st checkbox > input name="Grid1[2]" type"checkbox" file://1st > grid, 2nd checkbox... Seems I can't do another way than this. Not possible to do just Grid1[]. > After submit you will receive $_POST['Grid1'] as an > ARRAY containing all > indices of the checked checkboxes. Then loop through > it and do what ever you > want: > > foreach ($_POST['Grid1'] as $value) { > > echo $value; > } So, I did it like you said but the result of echo $value is "on" not the checkedbox number. Regards. Dave Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Yahoo! Messenger: dialoguez instantanément avec vos amis. Téléchargez GRATUITEMENT sur http://fr.messenger.yahoo.com

« previous php.general (#191308) next »