Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

lang change


 / Published in: Other
 

  1. <?
  2. session_start();
  3.  
  4. $languages = array("uk", "ie");
  5.  
  6. if(!isset($_SESSION['lang'])){
  7. $_SESSION['lang'] = $languages[0];
  8. }
  9.  
  10. if(isset($_REQUEST["lang"]) && in_array($_REQUEST["lang"], $languages)){
  11. $key = array_search($_REQUEST["lang"], $languages);
  12. $_SESSION['lang']=$languages[$key];
  13. }
  14.  
  15. //need to also set to euros accordinly
  16.  
  17. ?>
  18.  
  19. <?= ($_SESSION['lang']=="uk") ? '01952 288 999' : '021 458 0970'; ?>

Report this snippet  

You need to login to post a comment.