I have been trying for the past two hours to write in the shortened conditional expression of PHP below:
public static $url = $_SERVER['HTTP_REFERER']; if (false !== strpos($url,'en')) { $currlang = 'en'; } else { $currlang = 'fr'; }
I cannot figure out how to do this, although I tried many options and I also read online examples. Could you help me?
source share