So I have been searching for a while and cannot find the answer to a simple question. Is it possible to have an array of objects in PHP? Such as:
$ar=array()
Yes.
$array[] = new stdClass; $array[] = new stdClass; print_r($array);
Results in:
Array ( [0] => stdClass Object ( ) [1] => stdClass Object ( ) )