Re: [請益] 關於精簡的寫法

看板PHP作者 (發不完的gmail)時間15年前 (2010/07/20 10:24), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/5 (看更多)
※ 引述《davidou (老歐 ! 月夜雪嵐)》之銘言: $checked_array = array( "U"=>"", "Y"=>"", "N"=>""); $checked_array[$canPost_value] = " checked"; echo"<input type='radio' value='U' name='canPost'{$checked_array[U]}>審核中<br>" ."<input type='radio' value='Y' name='canPost'{$checked_array[Y]}>可發布<br>" ."<input type='radio' value='N' name='canPost'{$checked_array[N]}>拒絕發佈"; 這樣看起來比較簡單,也比較乾淨 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 74.207.250.203 ※ 編輯: yukang 來自: 74.207.250.203 (07/20 10:28)
文章代碼(AID): #1CHGZf3k (PHP)
文章代碼(AID): #1CHGZf3k (PHP)