title: PHP How to compare each array value with my specified value?
body: <p>Say for example this is my code:</p>
  
  <pre><code>$query = "SELECT * FROM ...";
  $exec_query = mysql_query($query, $db_connect);
  $fetchdetails = mysql_fetch_array($exec_query);
  </code></pre>
  
  <p>I am using an <code>if</code> condition like this:</p>
  
  <pre><code>if ($fetchdetails['field_name'] == 3) {
   do something;
  }
  
  else {
  }
  </code></pre>
  
  <p>But in this, only 1 row is compared from the <code>fetchdetails</code> array. What can I do to compare each row in that array with 3? I don't want any OOP's solutions, please, I want to stick with traditional coding. Thank you.</p>