WireArray::index() method

Returns a new WireArray of the item at the given index.

Unlike WireArray::get() this returns a new WireArray with a single item, or a blank WireArray if item doesn't exist. Applicable to numerically indexed WireArray only.

Usage

$items = $wireArray->index(int $num);

Arguments

NameType(s)Description
numint

Index number

Return value

See Also


WireArray methods and properties

API reference based on ProcessWire core version 3.0.244

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH