1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Refactor each() function to foreach()

The each() function has been deprecated since PHP 7.2 and shouldn't be
used anymore:
- http://php.net/manual/en/function.each.php
This commit is contained in:
Peter Kokot
2018-11-04 02:03:56 +01:00
parent b7231b60cd
commit 190459c766
6 changed files with 14 additions and 8 deletions

View File

@@ -302,7 +302,7 @@ if (isset($_POST['maillist'])) {
function output_lists_table($mailing_lists)
{
echo '<table cellpadding="5" border="0" class="standard mailing-lists">', "\n";
while ( list(, $listinfo) = each($mailing_lists)) {
foreach ($mailing_lists as $listinfo) {
if (!is_array($listinfo)) {
echo "<tr><th>{$listinfo}</th><th>Moderated</th><th>Archive</th>" .
"<th>Newsgroup</th><th>Normal</th><th>Digest</th></tr>\n";