I need to embedd 2 values in each of the options of a drop down list and then need to be able to pass both of them to a JavaScript function.
<select onChange="display(<?=$manufacturers_id?>,<?=$modelID?>,this.value1,this.value2);">
..
..
echo "<option value1=\"".$variantID."\" value2=\"".$month_year."\">".$products_variant." ".$month_year."</option>";
..
..
</select>
As you can see this HTML code is generated by PHP, I need these two values fetched from database to passed to a JS function.
I am open to suggestions on better way of doing this?