I got really confused when i tried to transfer variables from php to js. everything is fine when i try to get value using an id for example:
var name = $
what the code does is:
//then these are printed on the page normally
and then the browser receives: