I am trying to make a simple multilanguage, based on two buttons and get current lang by dedecting the full url path... The problem that i have with my code bellow is that it doesn't return the string after "=" equal symbol
While it display this http://www.example.com/site/?lang=en in the url, i am getting "Array"
<?php
$string = $_SERVER['REQUEST_URI'];
$string_parts = explode("=", $string);
if ($string_parts == "en"){
echo "English";
}
if ($string_parts == "De"){
echo "German";
}
?>