title: Pass variable from php to javascript function argument
body: <p>I want a variable that is in php to javascript function argument, but I do not get :( anyone can help me ..</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//file js.js
  function ComputeTotalPrice(first_meters_price){
    alert(first_meters_price);//result undefined
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;?php
      ...
   $first_meters_price = price_type(get_geo_id("Rural"), //returns 4
   
  ?&gt;
  &lt;script src="js.js" &gt;
    ComputeTotalPrice(&lt;? echo $first_meters_price; ?&gt;);
  &lt;/script&gt;
    &lt;head&gt;
      ...
    &lt;/head&gt;
    &lt;body&gt;
   &lt;div id='reserva'&gt;
        ...
   &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>