0
有沒有適當的語法來避免在codeigniter的div? 我真的不喜歡開始和結束標記所有的時間...codeigniter避免html div的
<div class="theForm">
<?php
echo form_open('edit/links');//this form uploads
echo "Enter the Name: ". form_input('name','name');
echo "Enter the Link: ". form_input('url','url');
echo " ".form_submit('submit', 'Submit');
echo form_close();
if (isset($linksQuery) && count($linksQuery)){
foreach($linksQuery as $link){
echo anchor($link['link'], $link['name'].".", array("class" => "links"));
echo form_open('edit/links',array('class' => 'deleteForm'));
echo form_hidden('name',$link['name']);
echo " ".form_submit('delete','Delete');
echo form_close();
echo br(2);
}
}
?>
</div>
什麼你的意思是避免使用div嗎?無論使用純HTML還是PHP函數,它們都必須以任何方式打開和關閉。除非有其他必要,否則我堅持使用純HTML。 – simshaun 2010-12-21 22:18:36
我的意思是使用一個PHP的替代品的div和特別是像我所謂的「theForm」 – rabidmachine9 2010-12-21 22:28:57