how to pass the callback javascript response to php if let's say i'm in a single php file ?. here's a sample snippet of e.g test.php
<html>
<head>
<script>
var _somestuff = _somestuff || [];
(function () {
_somestuff.push(['id', blahblah], ['setApiKey', "blahblah"]
);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.defer = true;
g.async = true;
g.src = 'blahblah.js';
s.parentNode.insertBefore(g, s);
})();
function myCallback(response)
{
if (response !== undefined) {
var data = JSON.parse(response);
var item_ids = data.items;
console.log(item_ids);
}
}
_somestuff.push(['blahblah',"001124","blahblah","myCallback"]);
</script>
</head>
<body>
</body>
</html>
what I want to happen is, display the data or the item_ids inside the html body using php.. how to do that?, i'm in a single page, I don't want to use ajax or whatever,is that possible ?