[thelist] Re: thelist digest, Vol 1 #2613 - 46 msgs

TJ troy.janisch.nospam at onlinearts.net
Tue Sep 17 09:30:01 CDT 2002

[ Picked text/plain from multipart/alternative ]
<tip type="PHP Loading form Arrays" author="theideahamster">
Given recent questions asking how to create large arrays from form
elements, I thought I'd share this tip.

In PHP, you can give form elements array names. For example, instead
of calling a checkbox field "states" you can call it "states[]". When
you do so, an array called "states[]" is populated and sent onto the
results page.

The grooviest thing about this is that you can crossover and load the
same array from different form elements -- combining drop-down lists,
radio buttons and text fields into the same array.


NOTE: To reply to this email message, you need to remove the
".nospam" from the return address. This was added to the return
address to reduce the amount of undesired junk email.

More information about the thelist mailing list