Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function detail_label($a)
- {
- //$data = $this->blog->get_by_label($a);
- $data = $this->blog->get_all_by_label();
- $save_array = array();
- $data_tb = array();
- $row = array();
- foreach ($data->result() as $key) {
- $save_array[] = $key;
- }
- //print_r($save_array);
- $count = count($save_array);
- $url3 = $this->uri->segment(2);
- for($i=0; $i<$count; $i++){
- $pecah = explode(',', $save_array[$i]->label);
- $clear_array = array_unique($pecah);
- if(strtolower($clear_array[0])==$url3){
- $row['judul'] = $save_array[$i]->judul;
- $row['slug'] = $save_array[$i]->slug;
- $row['label'] = $save_array[$i]->label;
- echo $save_array[$i]->label;
- echo $save_array[$i]->judul;
- echo "<br>";
- }
- $data_tb[] = $row;
- }
- var_dump($data_tb);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement