SHARE
TWEET

Untitled

a guest Jan 20th, 2020 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function detail_label($a)
  2.     {
  3.         //$data = $this->blog->get_by_label($a);
  4.         $data = $this->blog->get_all_by_label();
  5.         $save_array = array();
  6.         $data_tb = array();
  7.         $row = array();
  8.  
  9.         foreach ($data->result() as $key) {
  10.             $save_array[] = $key;
  11.         }
  12.         //print_r($save_array);
  13.         $count = count($save_array);
  14.         $url3 = $this->uri->segment(2);
  15.  
  16.         for($i=0; $i<$count; $i++){
  17.             $pecah = explode(',', $save_array[$i]->label);
  18.             $clear_array = array_unique($pecah);
  19.            
  20.              if(strtolower($clear_array[0])==$url3){
  21.                 $row['judul'] = $save_array[$i]->judul;
  22.                 $row['slug'] = $save_array[$i]->slug;
  23.                 $row['label'] = $save_array[$i]->label;
  24.  
  25.                 echo $save_array[$i]->label;
  26.                 echo $save_array[$i]->judul;
  27.                 echo "<br>";
  28.              }
  29.              $data_tb[] = $row;
  30.         }
  31.        
  32.         var_dump($data_tb);
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top