title: Loop through Array in php find value stop loop and echo header
body: <pre><code>foreach($resorts as $askiarea)
  {
  
      $askiarea = (array) $askiarea;
  
      $askiarea['ReportType'] = $askiarea['resortStatus'];
  
      $flag=1;
  
  
      if (($askiarea['ReportType'] ==6) || ($askiarea['ReportType'] =="6"))
      {
  
          if($flag ==1)
  
      echo '&lt;tr&gt;&lt;th colspan="6" text-align="left"&gt;&lt;div class="region-headline"&gt;Opening Soon For Snow Sports&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;';}
  
      $flag = 0;
  
  
  
   }
  </code></pre>
  
  <p>The header only need to be echoed once after the value is found for ReportType every time I try this I get multiply headers.</p>