title: running query for array elements
body: <pre><code>&lt;?php
  foreach($paradise as $nepal)
  {
    $qry="select * from img where name='$nepal'";
    $ktm = mysql_query($qry);
    while($result=mysql_fetch_assoc($ktm))
    {
      ?&gt;
      &lt;img src="uploads/&lt;?php echo $result['image']; ?&gt;" height="200px" width="200px"&gt;
      &lt;?php
    }
  }
  ?&gt;
  </code></pre>
  
  <p>I want to run queries for all $paradise array elements. This code works just fine but I assume this is not a correct way to do. I know a single query can handle this but I don't get it. Help me!!</p>