each is not working in PHP Version 8.1.17
public function DisplayMenu($buttons) { echo "<!-- menu -->```
<nav>"; while (list($name, $url) = each($buttons)) { $this->DisplayButton($name, $url, !$this->IsURLCurrentPage($url)); } echo "</nav>\n";
}
https://board.phpbuilder.com/d/10403957-each-is-not-working-in-php-8-is-old-code-to-change-for-foreach