Last active
August 29, 2015 14:06
-
-
Save jesseincn/d276958e61ca7f14d507 to your computer and use it in GitHub Desktop.
添加和编辑共用一个下拉列表
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name="role" id="role"> | |
<option value="">请选择角色</option> | |
<?php foreach ($roles as $role):?> | |
<option value="<?php echo $role->ID ?>" <?php if(isset($uinfo)){echo ($uinfo['ID']==$role->ID)?'selected=selected':'';} ?> ><?php echo $role->NAME ?></option> | |
<?php endforeach;?> | |
</select><span class="maroon">*</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment