simple jquery document ready and then I need some value from php to be alerted for example remote address.
$(document).ready(function() {
string1="<?= $_SERVER['REMOTE_ADDR'] ?>";
alert(string1);
When I write like this result is
<?= $_SERVER['REMOTE_ADDR'] ?>
What's wrong ? no way to pass some php inside js file ?