Javascript - How to change a new value on drop down
<p>When we change the <code>name="quantity"</code> and the <code>$product['price']</code> value will changing too.  Here will have dynamic quantity and price. How to do that using jquery/javascript.</p>

<pre><code>&lt;?php
$select  = "SELECT * FROM `products` ORDER BY `id` DESC LIMIT 10"; 
$query  = mysql_query($select) or die(mysql_error());
?&gt;

&lt;ul&gt;
  &lt;?php while($product = mysql_fetch_array($query)) { ?&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;?php echo $product['name'];?&gt;&lt;/p&gt;
    &lt;p&gt; Quantity
      &lt;select name="quantity"&gt;
        &lt;?php  for($i=1;$i&lt;=$product['quantity'];$i++) { ?&gt;
        &lt;option value="&lt;?php echo $i; ?&gt;"&gt;&lt;?php echo $i; ?&gt;&lt;/option&gt;
        &lt;?php } ?&gt;
      &lt;/select&gt;
   &lt;/p&gt;
   &lt;p&gt;&lt;?php echo $product['price'];?&gt;&lt;/p&gt;
 &lt;/li&gt;
&lt;?php } ?&gt;
&lt;/ul&gt;
</code></pre>

<p>Let me know :)</p>
