title: To get a link from database
body: <p>Hi Im currently using codeigniter, Below i have attached the complete code. As i run this Im getting data from database but i want URL field to be link.How to do that. 
   This is my controller:</p>
  
  <pre><code>public function ajaxsearch()
  {
     if(is_null($this-&gt;input-&gt;get('id')))
      {
          $this-&gt;load-&gt;view('input_view');    
      }
      else
      {
          $this-&gt;load-&gt;model('Infomodel'); 
  
          $data['Infotable']=$this-&gt;Infomodel-&gt;Infotable($this-&gt;input-&gt;get('id')); 
  
          $this-&gt;load-&gt;view('output_view',$data);
      }
  }
  </code></pre>
  
  <p>Below is the model:</p>
  
  <pre><code>class Infomodel extends CI_Model 
  {
  
  
      function Infotable($search)
      {
  
          $query = $this
                  -&gt;db
                  -&gt;select('*')
                  -&gt;from('Info_table')
                  -&gt;like('NAME',$search)
                  -&gt;or_like('URL',$search)
                  -&gt;get();
  
          if($query-&gt;num_rows()&gt;0)
          {
              return $query-&gt;result(); 
          }
          else
          {
              return null;
          }
  
      }
  
  }
  </code></pre>
  
  <p>and two views: one is input_view</p>
  
  <p>And another is output_view:</p>
  
  <pre><code>if(!empty($Infotable ))  
  {
  
      $output = '';
      $outputdata = '';  
      $outputtail ='';
  
      $output .= '&lt;div class="container"&gt;
             &lt;div class="table-responsive"&gt;
             &lt;table class="table table-bordered"&gt;
              &lt;thead&gt;
                    &lt;tr&gt;
            &lt;th&gt;No&lt;/th&gt;
                        &lt;th&gt;Name&lt;/th&gt;
                        &lt;th&gt;Url&lt;/th&gt;
                        &lt;th&gt;Tags&lt;/th&gt;
            &lt;/tr&gt;
  
             &lt;/thead&gt;
             &lt;tbody&gt;
             ';
  
      foreach ($Infotable as $objects)    
      {   
          $outputdata .= ' 
  
              &lt;tr&gt; 
              &lt;td &gt;'.$objects-&gt;id.'&lt;/td&gt;
              &lt;td &gt;'.$objects-&gt;name.'&lt;/td&gt;
              &lt;td&gt;'.$objects-&gt;url.'&lt;/td&gt;   
                      &lt;td&gt;'.$objects-&gt;tags.'&lt;/td&gt;
              &lt;/tr&gt; 
  
      ';
      //  echo $outputdata; 
  
      }  
  
      $outputtail .= ' 
                   &lt;/tbody&gt;
                   &lt;/table&gt;
                   &lt;/div&gt;
                   &lt;/div&gt; ';
  
      echo $output; 
      echo $outputdata; 
      echo $outputtail; 
  }
  
  else  
  {  
      echo 'Data Not Found';  
  }
  </code></pre>
  
  <p>Thanks in advance for the help.</p>