There is a php file (current.php) with some variables, like:
function do() {
$var = 'something';
}
And one more php file (retrieve.php), which is loaded to current.php with jQuery ajax .load().
The problem is – retrieve.php doesn’t see $var.
Tryed this (inside retrieve.php, shows nothing):
global $var;
echo $var;
How to fix?
Thanks.
Some things you must be aware of:
global $foo;statement inside the function.Said that, I suggest you reconsider your question and try to explain what you need to accomplish rather that how you want to implement it.