title: How to display image in a row from database?
body: <p>I want to retrieve the image from the database and want to display it in a row like if there is 20 images in a database then it should get display in 5 rows containing 4 images in each row...
  My code is working properly but i am facing problem in image path as i hv stored the image-name in database and image inside admin/uploads folder.... like uploads folder is inside the admin folder... adminfolder/uploadsfolder/file-name</p>
  
  <p>here in my code i am getting problem in tracing the image path.....</p>
  
  <p>I am Facing problem in this line..
  // my all images is in admin/uploads folder</p>
  
  <pre><code>echo "&lt;td&gt;&lt;img src=\"".$path[$i]."\" height='100'/&gt;&lt;/td&gt;";
  </code></pre>
  
  <p>Here is my full code</p>
  
  <pre><code>&lt;?php
  mysql_connect('localhost','root','') or die(mysql_error());
  mysql_select_db('dogs_db') or die(mysql_error());
  
  $sql = "SELECT file_name FROM dogsinfo";
  $res = mysql_query($sql) or die(mysql_error());
  echo "&lt;table&gt;&lt;tr&gt;";
  while($fetch = mysql_fetch_assoc($res)) {
  $path[] = $fetch['file_name'];
  }
  
  for($i=0;$i&lt;count($path);$i++){
  
  if($i%4 == 0){
  echo "&lt;/tr&gt;";
  }
  // I am Facing Problem here ... 
  // my all images is in admin/uploads folder
  
  echo "&lt;td&gt;&lt;img src=\"".$path[$i]."\" height='100'/&gt;&lt;/td&gt;";
  
  }
  echo "&lt;/tr&gt;&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>Please help me to sort out this....</p>