get_bookings() as $EM_Booking){ if($EM_Booking->status == 1){ $people[$EM_Booking->person->ID] = $EM_Booking->person; } } ?>