Search the Community
Showing results for tags 'dynamic'.
-
Hi All. I want to update my page titles dynamically with the applicable title in the selected language (Chapter 17 - Forum). I have searched the web without success. My code below shows the default "Website Name". Any help will be much appreciated. Regards. header.html snippet <!-- Page title --> <title><?php // Use the default page title if one was not provided: if (isset($page_title)) { echo $page_title; } else { echo 'Website Name'; } ?></title> signup.php snippet // Include the page title: $page_title = $words['signup'];
-
hello, I have starting reading the PHP and MySQL 4th edition book by LarryUllman. So far I have completed first four chapters and now starting 5th chapter. But, with time as I read further, I also want to develop good skills i.e be good in what I am learning. So can anyone suggest me some startup projects? or scripts etc I can try to code, so I can be more good in programming. Regards,
-
Hi, I need to use a model with dynamic table name in my application. I have found a piece of code to use like that: $model = new DynamicModel($tableName); The code is as follows: class DynamicModel extends CActiveRecord { private static $_tableName; public function __construct($tableName) { if(strlen($tableName) == 0) { return false; } if(strlen($tableName)>0){ self::$_tableName = $tableName; } self::setIsNewRecord(true); } public static function model($tableName) { if(strlen($tableName) == 0) { return false; } $className=__CLASS__; if(strlen($tableName)>0){ self::$_tableName = $tableName; } return parent::model($className); } public function tableName() { return '{{'.self::$_tableName.'}}'; } public function setTableName($tableName) { self::$_tableName = $tableName; } ...// The rest of model code }