I got a select tag with some options in a HTML form:
(the data will be collected and processed using PHP)
Testing:
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)
";
echo "Colour: ". $result_explode[1]."
";
?>
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. As you can see, I've separated and labelled them so you can see the effect this is causing.
I hope this helps someone :)