I have a php page, where at the bottom of the page I have some javascript code.
I use php inside the javascript code, like this:
alert ("<?php echo $variable; ?>");
If I put this in a separate file, this wont work for some reason. Is there anyway to make it work from a separate file without too much difficulty?
Or is there another way I don't know of yet to make javascript code invisible for the users? (for example so they cant see the code by viewing the source code)
Thanks