duckspeaker (duckspeaker) wrote in php,

Build Array from Checkboxes in Form

I’m helping with a web form that has a lot of selectable options.
(There must be 70 different items that can be selected by the user, in any number of combinations.)

These are represented as check boxes in the form.

I’m wondering if there is a way to create an array of all the selected items without having to check each one individually, and adding it manually.

I suppose I could make a function to do all the hard work…but I’d still have to call that function for each and every checkbox item.  Seems inefficient.

Any ideas?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.