I have PHP function:
public function doit()
{
$arr1= array();
$arr1['index1'] = 'value1';
$arr1['index2'] = 'value2';
}
I call it from my JQuery function:
$.ajax
({
url: "/controller/doit",
success: function()
{
alert('done!');
}
});
Everything I want is - that my JQuery function, which contains this ajax call will return me the array, which is identical to the one, which PHP function returned (the only difference is language of course: JS instead of PHP)