Re: Why Arrays in Forms? ( Was "Accessing variables from a form" )

From: Date: Wed, 21 Feb 2001 21:44:05 +0000
Subject: Re: Why Arrays in Forms? ( Was "Accessing variables from a form" )
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41064@lists.php.net to get a copy of this message
You don't have to specify them as "PHP arrays". You can do something like: <input type=text name="myArray[]"> <input type=text name="myArray[]"> <input type=text name="myArray[]"> <input type=text name="myArray[]"> PHP will create the array for you. Jason --- Brian White <bwhite@steptwo.com.au> wrote: > Why do you have to specify multi-value fields in > HTML > forms specifically as PHP arrays? > > It seems incompatible with other CGI languages, and > could make it difficlt to chop and change CGI > engines in > the background. > > At 19:08 21/02/2001 +0200, Pavel Jartsev wrote: > >If you create your fields like this: > ><? > >... > >echo '<input type="text" > name="name['.$rownum.']">'; > >echo '<input type="text" > name="phone['.$rownum.']">'; > >echo '<input type="text" > >name="fax['.$rownum.']">'; > >... > >?> > > Regs > > Brian White > ------------------------- > Brian White > Step Two Designs Pty Ltd - SGML, XML & HTML > Consultancy > Phone: +612-93197901 > Web: http://www.steptwo.com.au/ > Email: bwhite@steptwo.com.au > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribe@lists.php.net > For additional commands, e-mail: > php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/

« previous php.general (#41064) next »