src/Label305/Auja/Utils/Utils.php
public static function array_insert(&$array, $item, $position) {
        if ($position == 0) {
            /* Prepend the item */
            array_unshift($array, $item);
        } else {
            if (count($array) == $position) {
                $array[] = $item;
            } else {
                array_splice($array, $position, 0, array($item));
            }
        }
    }
public static function array_insert(&$array, $item, $position) {
        if ($position == 0) {
            /* Prepend the item */
            array_unshift($array, $item);
        } else {
            if (count($array) == $position) {
                $array[] = $item;
            } else {
                array_splice($array, $position, 0, array($item));
            }
        }
    }
public static function array_insert ( & $ array , $ item , $ position ) { if ( $ position == 0 ) { /* Prepend the item */ array_unshift ( $ array , $ item ) ; } else { if ( count ( $ array ) == $ position ) { $ array [ ] = $ item ; } else { array_splice ( $ array , $ position , 0 , array ( $ item ) ) ; } } }
Inserts given item into given array at given position.

@param array   $array    The array to insert the item in.
@param mixed   $item     The item to insert.
@param integer $position The position to insert the item at.
Inserts given item into given array at given position .