I am trying to append php to a div using
<script>
var values = {var1: 2, var2:"Hello"};
$('#id').append($.get("phpfile.php", values));
</script>
However it doesnt seem to append the basic echo in the php file
<?php
$var1 = $_GET['var1'];
$var2 = $_GET['var2'];
echo "var1= " . $var1 . " " . "var2= " . $var2;
?>
any help would be appreciated.