I have this piece of php code :
<?php
$food = 100;
$food $food - 10;
?>
and I need to update it so it displays the food variable on the web page immediately without reloading the whole page
This would be the javascript code:
var food = 100;
var food = food - 10;
$("div").html(food);