<?php var $stats=5; ?>
jQuery code
var $results=<?php echo json_encode($stats);?>;
I would like to import PHP variable values into jQuery file. I wrote the following code, but I keep getting the following error in my console:
expected expression, got '<'
I have tried to edit the httpd-conf file to enable interactions between PHP and JS as some suggestions online have stated, but I am still getting the same error.

New Topic/Question
Reply


MultiQuote



|