- array_push: documentation ( source)
- var_dump: documentation ( source)
<?php
$array = [];
$a = ['itemListElement' =>
['@type' => 'ListItem', 'position' => '1', 'item' => ['name' => 'testName1']]];
$b = ['itemListElement' =>
['@type' => 'ListItem', 'position' => '2', 'item' => ['name' => 'testName2']]];
array_push($array, $a);
var_dump($array);