|
PHP复制代码 $result['content']['html_status'] != 'Off' ? $result['content']['html_open'] = 'checked=\'checked\'' : $result['content']['html_close'] = 'checked=\'checked\'';
$result['content']['comments_status'] != 'Off' ? $result['content']['comment_open'] = 'checked=\'checked\'' : $result['content']['comment_close'] = 'checked=\'checked\'';
$result['content']['audit'] != 'Off' ? $result['content']['audit_open'] = 'checked=\'checked\'' : $result['content']['audit_close'] = 'checked=\'checked\'';
复制代码
这里我需要两个变量去鉴别文章选哪个?这里貌似这样做很冗余,但是我想不到其他办法???求教,或者有其他更好的建议吗?
|
|