WireArray::insertAfter() method

Insert an item after an existing item

Example

$items->insertAfter($newItem, $existingItem); 

Usage

$wireArray->insertAfter($item, $existingItem);

Arguments

NameType(s)Description
itemWire, string, int

Item you want to insert

existingItemWire, string, int

Item already present that you want to insert after

Return value

$this

Object instance it was called from (method supports fluent interface).


WireArray methods and properties

API reference based on ProcessWire core version 3.0.244

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer