public static function arrayToObject($array)
    {
        $obj = new \stdClass();
        foreach($array as $k => $v)
        {
            if(strlen($k))
            {
                if(is_array($v) && count($v) > 0)
                {
                    // recursive
                    $instance = new static;
                    $obj->{$k} = $instance->arrayToObject($v);
                }
                else
                {
                    $obj->{$k} = $v;
                }
            }
        }
        return $obj;
    }
public static function arrayToObject($array)
    {
        $obj = new \stdClass();
        foreach($array as $k => $v)
        {
            if(strlen($k))
            {
                if(is_array($v) && count($v) > 0)
                {
                    // recursive
                    $instance = new static;
                    $obj->{$k} = $instance->arrayToObject($v);
                }
                else
                {
                    $obj->{$k} = $v;
                }
            }
        }
        return $obj;
    }
public static function arrayToObject ( $ array ) { $ obj = new \ stdClass ( ) ; foreach ( $ array as $ k => $ v ) { if ( strlen ( $ k ) ) { if ( is_array ( $ v ) && count ( $ v ) > 0 ) { // recursive $ instance = new static ; $ obj -> { $ k } = $ instance -> arrayToObject ( $ v ) ; } else { $ obj -> { $ k } = $ v ; } } } return $ obj ; }
convert a array to object

@param $array
@return stdClass
convert a array to object