public static function switchVars(array $vars)
    {
        $i = 0;
        foreach ($vars as $k => $v) {
            if ($i == 0) {
                $pk = $k;
                $pv = $v;
            } else {
                return array($pk => $v, $k => $pv);
            }
            $i++;
        }
    }
public static function switchVars(array $vars)
    {
        $i = 0;
        foreach ($vars as $k => $v) {
            if ($i == 0) {
                $pk = $k;
                $pv = $v;
            } else {
                return array($pk => $v, $k => $pv);
            }
            $i++;
        }
    }
public static function switchVars ( array $ vars ) { $ i = 0 ; foreach ( $ vars as $ k => $ v ) { if ( $ i == 0 ) { $ pk = $ k ; $ pv = $ v ; } else { return array ( $ pk => $ v , $ k => $ pv ) ; } $ i ++ ; } }
Switches the first two variables of an array while leaving its keys.

@param  array  $vars
@return array
Switches the first two variables of an array while leaving its keys .