title: How to display data from MYSQL in codeignitor?
body: <p>I want to create a dynaic page, I have created model and controller and also data subitted in database successfully. Now, i'm having problem while displaying that data on front end. </p>
  
  <p>Here is my Modal:</p>
  
  <pre><code>function getcorporate(){
      $q="SELECT * from corporate"; 
      $query=$this-&gt;db-&gt;query($q);
      return $query-&gt;result_array();
     }
  </code></pre>
  
  <p>Here is my Controller: </p>
  
  <pre><code>function corporate()
      {
  
          $popular['popular'] = $this-&gt;auth_model-&gt;getPopularcourses();
          $data1['corporate'] = $this-&gt;auth_model-&gt;getcorporate();
          $data["institute_details"] = $this-&gt;auth_model-&gt;getInstitutedetails();
          $data1['course'] = $this-&gt;auth_model-&gt;getcoursesdetailes();
          $this-&gt;load-&gt;view('nulearnFront/header', $data);
          $this-&gt;load-&gt;view('nulearnFront/corporate', $data1);
          $this-&gt;load-&gt;view('nulearnFront/footer', $popular);
      }
  </code></pre>