. if (!defined('EG')) die('Direct access not allowed!'); class Lang_En_Formats_To_Mysql { //convert the string from En decimal format to MySQL decimal format public function decimal($string) { return $string; } //convert the string from En float format to MySQL float format public function float($string) { return $string; } //convert the string from En double format to MySQL double format public function double($string) { return $string; } //convert the string from En date format to MySQL date format public function date($date) { if (preg_match('/^[0-9]{2}\-[0-9]{2}\-[0-9]{4}$/',$date)) { $dateArray = explode('-',$date); return $dateArray[2]."-".$dateArray[0]."-".$dateArray[1]; } return $date; } //convert the string from En enum format to MySQL enum format public function enum($string) { return $string; } }