PHP has a function named ‘setISODate’. This function takes year, week number and day as parameter and returns a date. <?php $date = new DateTime(); $date->setISODate(2011,48,4); //year , week num , day echo $date->format('d-m-Y'); //"prints" date here
As Zend has announce not to support mysql_* functions in future version’s of PHP (from PHP 5.5 and onwords). So now these functions will be deprecated. So now developers should try to use PDO or MySqli extension of PHP. Here is a small code snippet showing how to select records from Database using PDO.
In Yii framework if we want to get name of current controller name. It can be done by following command. <?php Yii::app()->controller->id; ?>
In Yii framework if we want to get name of current controller’s action. It can be done by following command. <?php echo Yii::app()->controller->action->id ?>
If we want to change language of a particular action in YII or for the whole application we need to , set CApplication::language . This can be done at runtime as in Yii::app()->language = 'fr'; but we can also do it in application configuration: array( // ...settings... 'language' => 'fr', // ...more settings... )
What is PHP PHP (PHP: Hypertext Preprocessor) is a widely used open source general-purpose scripting language that is especially suited for web development. PHP was developed by Rasmus Lerdrof in 1994. Here are some features of PHP that makes it one of the popular languages in world of web development.
Welcome to coding-guru.com This site has been launched to help community. We will be sharing our experience of number of technologies like PHP, MySql, Node Js, MongoDB, Yii Framework, Mobile Apps Development and Graphics. Our aim is to help and share. If you have some suggestion regarding the site or want to read some tutorial