Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. class Controller_Welcome extends Controller {
  2.    
  3.     public function action_index()
  4.     {
  5.         echo self::lang("Hi I'm using :framework, because I'm :hyperbool", array('framework'=>'Fuel', 'hyperbool'=>'awesome'));
  6.  
  7.     }
  8.  
  9.     static function lang($string, $array)
  10.     {
  11.     {
  12.         $key = array_keys($array);
  13.         $value = array_values($array);
  14.         return str_replace($key, $value, $string);
  15.     }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement