我试图理解当我运行btn_actions函数时,我没有回复给我。我试图让两个按钮在我的桌子上回显。
echo $this->functions_model->btn_actions(1);
die();
public function btn_actions($item_id)
{
$content = '<div class="controls center">';
$content = $this->btn_edit($item_id);
$content = $this->btn_delete($item_id);
$content = '</div>';
return $content;
}
public function btn_edit($item_id)
{
$button = '<a class="tip" href="'. current_url() . '/edit/' . $item_id .'" oldtitle="Edit Task" aria-describeby="ui-tooltip-8"><span class="icon12 icomoon-icon-pencil"></span></a>';
return $button;
}
public function btn_delete($item_id)
{
$button = '<a class="tip" href="'. current_url() . '/soft-delete/' . $item_id .'" oldtitle="Delete Task"><span class="icon12 icomoon-icon-remove"></span></a>';
return $button;
}
答案 0 :(得分:2)
您需要使用.
$content = '<div class="controls center">';
$content .= $this->btn_edit($item_id);
$content .= $this->btn_delete($item_id);
$content .= '</div>';
return $content;
答案 1 :(得分:1)
试试这个:
echo $this->functions_model->btn_actions(1);
die();
public function btn_actions($item_id)
{
$content = '<div class="controls center">';
$content = $content . $this->btn_edit($item_id);
$content = $content . $this->btn_delete($item_id);
$content = $content . '</div>';
return $content;
}
public function btn_edit($item_id)
{
$button = '<a class="tip" href="'. current_url() . '/edit/' . $item_id .'" oldtitle="Edit Task" aria-describeby="ui-tooltip-8"><span class="icon12 icomoon-icon-pencil"></span></a>';
return $button;
}
public function btn_delete($item_id)
{
$button = '<a class="tip" href="'. current_url() . '/soft-delete/' . $item_id .'" oldtitle="Delete Task"><span class="icon12 icomoon-icon-remove"></span></a>';
return $button;
}