Best Form Option For Multiple Values

Best form option for multiple values

I was actually wondering this today, and I achieved it by using the php explode function, like this:

HTML Form (in a file I named 'doublevalue.php':

PHP action (in a file I named doublevalue_action.php)

As you can see in the first piece of code, we're creating a standard HTML select box, with 2 options. Each option has 1 value, which has a separator (in this instance, '|') to split the values (in this case, model and colour).

On the action page, I'm exploding the results into an array, then calling each one.

Return Multiple Match Results in Excel (2 methods)

As you can see, I've separated and labelled them so you can see the effect this is causing.

I hope this helps someone :)

answered Apr 26 '13 at 6:24


48144 silver badges22 bronze badges

Best form option for multiple values