I want to display the student names from db and two buttons for each students. In my code i am using ajax function.
controller
function get_sib_filter()
{
$list_id= $this->input->post('id2');
if(($list_id)==1)
{
$filtered_students = $this->home_model->filter_by_sibling();
$new_string = "";
foreach($filtered_students->result() as $detail)
{
$new_string.=$detail->applicant_first_name;
$new_string=$new_string.'<a href="<?echo base_url();?>home/change_filter_status_green/"'.$detail->applicant_id.'" class="btn green button_style" title="Filter">Selected For Interview</a>';
$new_string=$new_string.'<a href="<?echo base_url();?>home/change_filter_status_red/"'.$detail->applicant_id.'" class="btn red but_style" title="Rejected">Rejected</a></br>';
}
echo $new_string;
}
}
But i got the last name only(last name and two buttons)
I want list all name and all name having two buttons
Plzz give suggetions..