title: How to add 1 to a javaScript variable?
body: <p>I want to add 1 to the value "$arate_num" and update the database with new $arate_num called "num3". But it is not working properly.</p>
  
  <p>Here is my PHP code.</p>
  
  <pre><code>$jsqla = mysql_query("select * from products where id='$product_id'") or die(mysql_error());
  $jfeta = mysql_fetch_assoc($jsqla);
  
  $arate_num = $jfeta['rate_number'];
  </code></pre>
  
  <p>Here is my javaScript code.</p>
  
  <pre><code>var phpvalue = "&lt;?php echo $arate_num; ?&gt;";
  var num = parseInt(phpvalue, 10);
  var num3 = parseInt(phpvalue+1, 10);
  alert(num3);
  </code></pre>