I would like to use a for or while loop instead of foreach to iterate through this object but I can't seem to make it work. The code prints various properties of an event... I would like to use the for / while loop so that I can only print 3 events. The result of the first line is 5.
$num =...