JSON Paddings for JSON output for JQuery AJAX crossdomain call

In my PHP backend if incoming call is normal PHP call then I would output JSON
$ output=array( ‘Message’ => ‘sccuess’, ‘Content’=>’OK’, );
sendResponse(200, json_encode($ output));

so the normal output would be
{“Message”:”success”, “Content”:”OK”}

However if it’s JQuery, Ajax call then my output would need to be
jsonp13174584447({“Message”:”success”, “Content”:”OK”})

The question is in my backend PHP code how do I generate that jsonp1317458444 tag and attach to the $ output array for jquery ajax call?

newest questions tagged jquery – Stack Overflow

About Admin