title: The each() function is deprecated. This message will be suppressed on further calls PHP 7.2
body: <p>I have the below <code>each()</code> line in a PHP file on a server where I recently upgraded the PHP version from 5 to 7.</p>
  
  <pre><code>while(list($file, $info) = each($this-&gt;images))
  </code></pre>
  
  <p>The error below is thrown by the web server after the restart.</p>
  
  <blockquote>
    <p>The <code>each()</code> function is deprecated. This message will be suppressed on further calls</p>
  </blockquote>
  
  <p>What will be the correct way of re-writing the above line of code in PHP 7.2?</p>
  
  <p>Thank you.</p>