I have a translate system:
/phps/languages.php
$root = $_SERVER['DOCUMENT_ROOT'];
if($lang == "en-us"){
include_once("$root/site-languages/en-us.php"); // include en-us
}
this function: /phps/date.php
function time_difference($date){
$root = $_SERVER['DOCUMENT_ROOT'];
include_once("$root/phps/languages.php");
echo $language_include_variable; // it is empty
and my page.php that will call date.php and date calls languages.php.
$root = $_SERVER['DOCUMENT_ROOT'];
include_once("$root/phps/date.php");
The problem is the echo $language_include_variable is null. any ideas?