手动方式.....
<select name="interest"> <option value="seo"<?php if($result['interest'] == 'seo'): ?> selected="selected"<?php endif; ?>>SEO и Блоговодство</option> .....
$interests = array( 'seo' => 'SEO и Блоговодство', 'auto' => 'Авто', ....);<select name="interest"><?php foreach( $interests as $var => $interest ): ?><option value="<?php echo $var ?>"<?php if( $var == $result['interest'] ): ?> selected="selected"<?php endif; ?>><?php echo $interest ?></option><?php endforeach; ?></select>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)