I want a variable that is in php to javascript function argument, but I do not get :( anyone can help me ..
//file js.js
function ComputeTotalPrice(first_meters_price){
alert(first_meters_price);//result undefined
}
<!DOCTYPE html>
<?php
...
$first_meters_price = price_type(get_geo_id("Rural"), //returns 4
?>
<script src="js.js" >
ComputeTotalPrice(<? echo $first_meters_price; ?>);
</script>
<head>
...
</head>
<body>
<div id='reserva'>
...
</div>
</body>
</html>