note 82500 rejected from control-structures.switch by nlopess
| From: | nlopess@php.net | Date: | Mon, 14 Apr 2008 16:38:03 +0000 |
| Subject: | note 82500 rejected from control-structures.switch by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138305@lists.php.net to get a copy of this message | ||
Note Submitter: apad dot net at gmail dot com
----
Hi,I want to use 2 language file,default is English and the second one is Bahasa. If user select
other than English, it will load the language file, otherwise English will be default. My code is a
below:
<?php
include('language/english.php');
$default_language = "English";
switch ($default_language){
case "Bahasa Melayu":
include('language/bahasa.php');
break;
}
?>
How should I use the select statement? If I use dropdown, how do I pass the command to load the
other language?
I am beginner in PHP