Re: passing array as hidden field

From: Date: Wed, 24 Apr 2002 19:53:27 +0000
Subject: Re: passing array as hidden field
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-94443@lists.php.net to get a copy of this message
On Thursday 25 April 2002 02:09, Kevin Stone wrote: > Concept is solid, method is wrong. Understand that <name=layer[]> is but > one index in the array. To produce an array with multiple indicies you > must create a separate <input> for each value. Example.. > > > foreach ($layer as $lay) > { > echo "<input type='hidden' name='layer[]' > value=$lay>"; > } I would always quote the value: value='xxx' or value="xxx" a) because the HTML spec requires it? b) if value contains a space it ain't going to work -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Advice from an old carpenter: measure twice, saw once. */

« previous php.general (#94443) next »