note 24832 added to language.variables.external

From: Date: Thu, 29 Aug 2002 15:20:11 +0000
Subject: note 24832 added to language.variables.external
Groups: php.notes 
Request: Send a blank email to php-notes+get-35990@lists.php.net to get a copy of this message
I keep forgetting this so I am putting this note here for the next time I forget! When you want to receive data from a client in a post method as an array from a selection box use [] after the name. e.g // … <select name=”fruits[]” multiple=”true” size=”10”> <option value=”apple“>apple</option> <option value=”pear“>pear</option> <option value=”banana“>banana</option> // … <?PHP // … for($i = 0; $i < count($fruits); $i++) { print("the value of fruits[$i] was $fruits[$i]" ); } // … ?> -- http://www.php.net/manual/en/language.variables.external.php http://master.php.net/manage/user-notes.php?action=edit+24832 http://master.php.net/manage/user-notes.php?action=delete+24832 http://master.php.net/manage/user-notes.php?action=reject+24832

« previous php.notes (#35990) next »