public static function convertToOneDimensionalArray($array)
    {
        $newArray = array();
        if (is_array($array))
        {
            foreach ($array as $value)
            {
                $newArray = array_merge($newArray, self::convertToOneDimensionalArray($value));
            }
        } else
        {
            $newArray[] = $array;
        }

        return $newArray;
    }
public static function convertToOneDimensionalArray($array)
    {
        $newArray = array();
        if (is_array($array))
        {
            foreach ($array as $value)
            {
                $newArray = array_merge($newArray, self::convertToOneDimensionalArray($value));
            }
        } else
        {
            $newArray[] = $array;
        }

        return $newArray;
    }
public static function convertToOneDimensionalArray ( $ array ) { $ newArray = array ( ) ; if ( is_array ( $ array ) ) { foreach ( $ array as $ value ) { $ newArray = array_merge ( $ newArray , self :: convertToOneDimensionalArray ( $ value ) ) ; } } else { $ newArray [ ] = $ array ; } return $ newArray ; }
Convert any array to one dimensional array.

@param array $array

@return array
Convert any array to one dimensional array .