IXR_Value::isStruct

Advertisement

Summery Summery

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

Syntax Syntax

IXR_Value::isStruct( array $array )

Parameters Parameters

$array

(Required)

Return Return

(bool)

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;
    }

Advertisement

Advertisement

Leave a Reply