Of course you can't access PHP variables in Javascript. PHP variables live on the server; Javascript runs on the client.
If you want to use the values of particular PHP variables in your Javascript code, you'll have use PHP to dynamically generate Javascript code that defines them, as Weedpacket described.