Need to use array_replace_recursive()

This is the function needed to overwrite $text array ontop of
$englishText, including nested arrays
This commit is contained in:
Matt Pass
2014-09-05 22:07:26 +01:00
parent d24a2745ce
commit 44aca5ad1b

View File

@@ -45,7 +45,7 @@ include(dirname(__FILE__)."/../lang/english.php");
$englishText = $text;
// Load chosen language ontop to replace English
include(dirname(__FILE__)."/../lang/english.php");
$text = array_merge($englishText, $text);
$text = array_replace_recursive ($englishText, $text);
$_SESSION['text'] = $text;
// Login not required or we're in demo mode and have password set in our settings, log us straight in