helpers/ArrayHelper.php
public static function move($names, &$from, &$to)
    {
        if (is_array($from) && is_array($to)) {
            foreach ($names as $key) {
                if (isset($from[$key]) && !isset($to[$key])) {
                    $to[$key] = static::getValue($from, $key);
                    $moved[$key] = static::removeValue($from, $key);
                }
            }
        }
        return $moved;
    }
public static function move($names, &$from, &$to)
    {
        if (is_array($from) && is_array($to)) {
            foreach ($names as $key) {
                if (isset($from[$key]) && !isset($to[$key])) {
                    $to[$key] = static::getValue($from, $key);
                    $moved[$key] = static::removeValue($from, $key);
                }
            }
        }
        return $moved;
    }
public static function move ( $ names , & $ from , & $ to ) { if ( is_array ( $ from ) && is_array ( $ to ) ) { foreach ( $ names as $ key ) { if ( isset ( $ from [ $ key ] ) && ! isset ( $ to [ $ key ] ) ) { $ to [ $ key ] = static :: getValue ( $ from , $ key ) ; $ moved [ $ key ] = static :: removeValue ( $ from , $ key ) ; } } } return $ moved ; }
Moves the item values from one array to another.
@param array $names the item names to move.
@param array $from the values to move from.
@param array $to the items to move to.
@return array with moved items.
Moves the item values from one array to another .