hay
my class
class language{
function merge($filename = ''){
// the path is true
return include_once ('language/'.$filename);
}
}
ok this lang test
en.php
<?php
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
$lang = array_merge($lang, array(
'test' => 'Home Page'
));
?>
if i add
echo $lang['test'];
in the en.php its return Home Page
but i i make the class
$l = new language;
$l->merge('en.php');
its not working
i checked it
var_dump($lang);
it return null
if you want to return something from an
include_oncecall you have to return something in the file. See Example 5.vs.
gives