私がこれを適切に行う方法を理解しようとしています。
print_rは次のようになります。
Array ( [0] => stdClass Object ( [quote] => "Now that's wonderful!" ) )
テーブルの作成:
$tmpl = array ( 'table_open' => '<table class="table" id="quotes-table">' );
$this->table->set_template($tmpl);
print_r($quotes);
$data = array(
array(form_checkbox('quotes'), 'Quote'),
array(form_checkbox('quotes'), 'Testing Quote Here'),
array(form_checkbox('quotes'), $quotes['quote'])
);
echo $this->table->generate($data);
?>
アップデート:
ただし、1行より多くのtを追加すると、その1行しか返されません。したがって、基本的には、クエリから返されるオブジェクトが必要です。これにより、ビューで$quote->quoteを実行できます。そうすれば、ユーザーのすべての引用符が表示されます。
<?php
$tmpl = array ( 'table_open' => '<table class="table" id="quotes-table">' );
$this->table->set_template($tmpl);
$checkbox_data = array(
'name' => 'quote',
'id' => $quotes->id
);
$data = array(
array(form_checkbox($checkbox_data), 'Quote'),
array(form_checkbox($checkbox_data), $quotes->quote)
);
echo $this->table->generate($data);