Hey,
I've been trying to write a function that will take an array from a file, and echo the contents into a different array, and here is the code for what I currently have:
function load_lang($lang_array, $file, $language) {
require "./language/".$language."/".$file.".php";
foreach ($lang as $key => $value)
{
$lang_array[$key] = stripslashes($value);
}
unset($lang);
return $lang_array;
}
and the code for an example language file:
<?php
$lang = array (
'username' => "blablabla",
)
?>
so, concievably, something like "echo($lang_array['username']);" should return "blablabla"
For some odd reason, it doesn't...
Could someone help me out, im really in a coding rut here 🙂
Thanks in advance 🙂
-Ben