public static function insert($array, $values, $index = null)
    {
        $values = (array) AnConfig::unbox($values);
        $array = (array) AnConfig::unbox($array);
        if ($index === null) {
            foreach ($values as $value) {
                array_push($array, $value);
            }
        } else {
            array_splice($array, $index, 0, $values);
        }

        return $array;
    }
public static function insert($array, $values, $index = null)
    {
        $values = (array) AnConfig::unbox($values);
        $array = (array) AnConfig::unbox($array);
        if ($index === null) {
            foreach ($values as $value) {
                array_push($array, $value);
            }
        } else {
            array_splice($array, $index, 0, $values);
        }

        return $array;
    }
public static function insert ( $ array , $ values , $ index = null ) { $ values = ( array ) AnConfig :: unbox ( $ values ) ; $ array = ( array ) AnConfig :: unbox ( $ array ) ; if ( $ index === null ) { foreach ( $ values as $ value ) { array_push ( $ array , $ value ) ; } } else { array_splice ( $ array , $ index , 0 , $ values ) ; } return $ array ; }
Insert into an array. If no offset is given then the values
are inserted at the end of the list. Returns the new array with
value inserted into.

@param array $array  The orignal array
@param array $values An array of values to be inserted

@return array
Insert into an array . If no offset is given then the values are inserted at the end of the list . Returns the new array with value inserted into .