Difference between #21 and #22 of
By Example: CHtml

Revision #22 has been created by Lensi on Mar 23, 2011, 1:44:39 PM with the memo:

Added end-parenthesis to '(Select a gender' in dropdownlist
« previous (#21) next (#24) »

Changes

Title unchanged

By Example: CHtml

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

listData, chtml, link, button

Content changed

[...]
This example will avoid the dropdownlist to be blank when no value, outputing some proper information to the user

```php
<?php echo CHtml::dropDownList('listname', $select,
array('M' => 'Male', 'F' => 'Female'),
array('empty' => '(Select a gender
)'));

```


***
[...]
78 0
75 followers
Viewed: 884 683 times
Version: 1.1
Category: Tutorials
Written by: jonah
Last updated by: glicious
Created on: Sep 25, 2009
Last updated: 2 years ago
Update Article

Revisions

View all history