I have been struggling with this kind of problem for a while now, and cannot seem to find any information or sample code to transfer some data between PHP and JavaScript. I saw many ways to do it, but not safely. What I mean exactly is , when you transfer some variable data between the systems, it is directly shown on the view-source window of your page, when it is loaded. What need exactly is a way to transfer the data, but silently and safely , so that it won't show up on the user-side when the page is loaded.
So in brief, is there a way to do this, and possible how ?
I have already tried, transferring the data with a XML file, JSON also, straight forward with echo + , or just after the ?> abbreviation in php. But every way I have used so far, is displayed in the source code of the page when loaded .