I've got a problem.
I've got 3 files, which'd be:
apikey.php
<?php
$apikey = 'xxxxxxxx';
?>
core.php
<?php
include 'apikey.php';
/* some other stuff here */
?>
login.php
<?php
include 'core.php';
function GetUserData($id) {
global $apikey;
/* some other stuff here */
return $apikey; // <- returning NULL
}
?>
So, as the comment says, $apikey is being returned as NULL.
But using it outside the function GetUserData it works as it should.
Any ideas?