Can an Option in a Select tag carry multiple values?

前端 未结 15 2552
执念已碎
执念已碎 2020-11-22 17:42

I got a select tag with some options in a HTML form:
(the data will be collected and processed using PHP)

Testing:

  
         
        
        
    

PHP:

 array('value1' => '1', 'value2' => '2010'),
    2 => array('value1' => '2', 'value2' => '2122'),
    3 => array('value1' => '3', 'value2' => '0'),
);
echo 'Selected option value 1: ' . $options[$_POST['Testing']]['value1'] . '
'; echo 'Selected option value 2: ' . $options[$_POST['Testing']]['value2'] . '
';

提交回复
热议问题