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
)'));

```


***
[...]
79 0
74 followers
Viewed: 993 826 times
Version: 1.1
Category: Tutorials
Written by: jonah
Last updated by: glicious
Created on: Sep 25, 2009
Last updated: 8 years ago
Update Article

Revisions

View all history