Ive looked at the example of get in jquery website. The last example show this..
$.get("test.php", { "func": "getNameAndTime" },
function(data){
alert(data.name); // John
console.log(data.time); // 2pm
}, "json");
I was wondering what is the “func” part..how it is used and what you can do with it ?
To me it seem of calling the function getnameAndTime somewhere but where ?
Thanks.
That means in php that the
$_GETparam will look like this:The second parameter in the
$.getjQuery function is the data you are sending to the script.