From a7f2d1fd48ecf3b8280699e0ce36618857aa9ff5 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 23 Jul 2013 13:34:37 -0300 Subject: simplify a bit using foreach --- config/openbgpd/openbgpd_status.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index 330062e5..228ff42b 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -86,18 +86,16 @@ function listCmds() { global $commands; echo "

This status page includes the following information:\n"; echo "

\n"; } /* Execute all of the commands which were defined by a call to defCmd. */ function execCmds() { global $commands; - for ($i = 0; isset($commands[$i]); $i++ ) { - doCmdT($commands[$i][0], $commands[$i][1]); - } + foreach ($commands as $command) + doCmdT($command[0], $command[1]); } ?> -- cgit v1.2.3