title: running a sql query with array elements
body: <p>what I am trying to do is extract elements of an array and running an sql query with the array element as the condition. The problem what I am facing is that the query does not return anything. The code is given below</p>
  
  <pre><code>//extracting the array elements
        foreach ($t as $value) {
        extract($value);
  
       }
   $sql = "SELECT * FROM daily_log where employee_log_id='$employee_log_id' AND log_date='$value'&lt;/br&gt;";
              $result = mysql_query($sql);
              $row = mysql_fetch_array($result);
          echo $row['in_time'];
          echo $row['out_time'];
  </code></pre>
  
  <p>The echo $row['in_time']  and echo $row['out_time']; does not show anything.</p>
  
  <p>Can anybody help me to figure out what the problem is
  Thanks in advance.</p>