Skip to the content
Documentation

Better Example

No ratings yet

I found this example to be a bit unreadable at first, since it was ambiguous that 2 was the offset, and not another item to add to the array. Clearer version:
{array( 'a', 'b', 'e' )|insert( 2, 'c', 'd' )}
The following array will be returned: ( 'a', 'b', 'c', 'd', 'e' ).