<select name="select" multiple>
<option data-value="1">first</option>
<option data-value="2">second</option>
<option data-value="4">fourth</option>
</select>
<div id="count"></div>
<?php $array =['1' => 50, '2' =>100, '3' =>500, '4' =>900]; ?>