IXR_Value::isStruct( array $array )

Checks whether or not the supplied array is a struct or not


Description Description


Parameters Parameters

$array

(array) (Required)


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: wp-includes/IXR/class-IXR-value.php

    function isStruct($array)
    {
        $expected = 0;
        foreach ($array as $key => $value) {
            if ((string)$key !== (string)$expected) {
                return true;
            }
            $expected++;
        }
        return false;
    }

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.