src/classes/CCArr.php
public static function add( $key, $item, &$arr ) 
	{	
		if( !is_array( $arr ) ) 
		{
			throw new \InvalidArgumentException('CCArr::add - second argument has to be an array.');
		}

		if ( !is_array( static::get( $key, $arr ) ) )
		{
			return static::set( $key, array( $item ), $arr );
		}

		return static::set( $key, static::push( $item, static::get( $key, $arr ) ), $arr );
	}
public static function add( $key, $item, &$arr ) 
	{	
		if( !is_array( $arr ) ) 
		{
			throw new \InvalidArgumentException('CCArr::add - second argument has to be an array.');
		}

		if ( !is_array( static::get( $key, $arr ) ) )
		{
			return static::set( $key, array( $item ), $arr );
		}

		return static::set( $key, static::push( $item, static::get( $key, $arr ) ), $arr );
	}
public static function add ( $ key , $ item , & $ arr ) { if ( ! is_array ( $ arr ) ) { throw new \ InvalidArgumentException ( 'CCArr::add - second argument has to be an array.' ) ; } if ( ! is_array ( static :: get ( $ key , $ arr ) ) ) { return static :: set ( $ key , array ( $ item ) , $ arr ) ; } return static :: set ( $ key , static :: push ( $ item , static :: get ( $ key , $ arr ) ) , $ arr ) ; }
Adds an item to an element in the array

Example:
CCArr::add( 'foo.bar', 'test' );

Results:
array( 'foo' => array( 'bar' => array( 'test' ) ) )

@param string		$key
@param mixed		$item		The item you would like to add to the array
@param array 		$array
@return array
Adds an item to an element in the array