private function _extract_values($array)
    {

        $result = array();

        // iterate through the array's values
        foreach ($array as $index => $value)

            // if entry is an array, flatten array recursively
            if (is_array($value)) $result = array_merge($result, $this->_extract_values($value));

            // otherwise, add the index to the result array
            else $result[] = $index;

        // return found values
        return $result;

    }
private function _extract_values($array)
    {

        $result = array();

        // iterate through the array's values
        foreach ($array as $index => $value)

            // if entry is an array, flatten array recursively
            if (is_array($value)) $result = array_merge($result, $this->_extract_values($value));

            // otherwise, add the index to the result array
            else $result[] = $index;

        // return found values
        return $result;

    }
private function _extract_values ( $ array ) { $ result = array ( ) ; // iterate through the array's values foreach ( $ array as $ index => $ value ) // if entry is an array, flatten array recursively if ( is_array ( $ value ) ) $ result = array_merge ( $ result , $ this -> _extract_values ( $ value ) ) ; // otherwise, add the index to the result array else $ result [ ] = $ index ; // return found values return $ result ; }
Helper method for validating select boxes. It extract all the values from an infinitely nested array and puts
them in an uni-dimensional array so that we can check if the submitted value is allowed.

@param  array   $array  The array to transform.

@return array           Returns the flat array.

@access private
Helper method for validating select boxes . It extract all the values from an infinitely nested array and puts them in an uni - dimensional array so that we can check if the submitted value is allowed .