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";

}

    7 days later
    Write a Reply...