This question already has an answer here:
- Jquery load() and PHP variables 6 answers
Assuming my example.php looks like this:
<?php
$variable = "I am a variable";
?>
and on another page I have:
<div id="loadme"></div>
How can I get that variable to my div?
Can it be achieved by using .load()
?
I can imagine could be something like this:
$('#loadme').load("example.php", $variable);
Am I even close?
</div>