title: Why image path is saved as word "images" instead of image name in table column in Codigniter
body: <p>I have to ask this twice here as my question is still unanswered. I don't understand if 'echo' or 'print_r' works differently for images in php &amp; Codeigniter.</p>
  
  <p>I have tried <code>echo $image;</code>, <code>print_r($image);</code> and <code>echo $sql = $this-&gt;db-&gt;last_query();</code>..</p>
  
  <p>Result for first 2 is 'property_image_1.png' and for 3rd is <code>UPDATE vbc_property_images SET profile_thumb = 'property_image_1.png' WHERE property_ref_id = '15'</code>.</p>
  
  <p>Now , my question is that when I run:</p>
  
  <p>Model</p>
  
  <pre><code>function update_profile_image($id, $image){
      $this-&gt;db-&gt;where('property_ref_id', $id);
      $this-&gt;db-&gt;set('profile_thumb', $image);
      $this-&gt;db-&gt;update('vbc_property_images');
      //echo $image;
      //print_r($image);
      //echo $sql = $this-&gt;db-&gt;last_query();
  }
  // New Added
  function get_property_all_images_url($id) {
      $this-&gt;db-&gt;select('property_images');
      $this-&gt;db-&gt;from('vbc_property_images');
      $this-&gt;db-&gt;where('property_ref_id', $id);
      $query = $this-&gt;db-&gt;get();
  $query_result = $query-&gt;result_array();
  if (empty($query_result)) {
      return FALSE;
  }
  elseif (count($query_result) &gt; 1) {
      return 0;
  }
  else{
      $rowId = explode(',',$query_result[0]['property_images']);
      return $rowId;
  }
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>function property_profile_image_update() {
      if($this-&gt;session-&gt;userdata('is_logged_in')){
      $username = $this-&gt;session-&gt;userdata('v_member_username');
      $id = $this-&gt;uri-&gt;segment(3);
      $image = $this-&gt;uri-&gt;segment(4);
      $data['images_urls'] = $this-&gt;my_listings_model-&gt;get_property_all_images_url($id); // New Added
      $this-&gt;my_listings_model-&gt;update_profile_image($id, $image);
      // Some Code
  </code></pre>
  
  <p>Why do I get the word "images" in profile_thumb column of table vbc_property_images?</p>
  
  <p>Table:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `vbc_property_images` (
    `id` int(11) NOT NULL,
    `property_ref_id` int(255) NOT NULL,
    `v_username` varchar(50) NOT NULL,
    `property_images` varchar(2000) NOT NULL,
    `property_images_thumb` varchar(2000) NOT NULL,
    `profile_thumb` varchar(1000) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
  </code></pre>
  
  <p>URL:</p>
  
  <blockquote>
    <p><a href="http://localhost/admin/dashboard/property-profile-image-update/15/property_image_1.png" rel="nofollow">http://localhost/admin/dashboard/property-profile-image-update/15/property_image_1.png</a></p>
  </blockquote>