An element in an array is looped plus a specified number?

an element in an array is iterated with a specified number
such as

.

clipboard.png

cycle wifimac and wanmac by 4

Php
Mar.14,2021

    <?php
        $arr = array(
                array(
                    'check'   => 0,
                    'wifimac' => 1,
                    'wanmac'  => 2
                    ),
                array(
                    'check'   => 3,
                    'wifimac' => 4,
                    'wanmac'  => 5
                    )
            );
            
        array_walk_recursive($arr, function (&$value, $key) {
            if($key == 'wifimac' || $key == 'wanmac') {
                $value += 4;
            }        
        });
        
        var_dump($arr);

isn't it OK to traverse the foreach loop directly?



Array
(
    [0] => Array
        (
            [wifimac] => 5
            [wanmac] => 7
        )

    [1] => Array
        (
            [wifimac] => 337
            [wanmac] => 32436
        )

)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48550-4d043.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48550-4d043.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?