Getting Items

$a->slice($n, $limit)

Introduced in Version 2.0


Returns a new WireArray containing a slice of items starting from the $n'th item and including up to $limit number of items.

The example below returns the first 3 skyscrapers. The first item in a WireArray is represented by index number 0. 

$items = $skyscrapers->slice(0, 3);

Post Comment