This should really be in the controller.  You would get the array of UntappdCheckins in the controller and add them to the $data array.  Then here in the view, you can use that key you set as an array, build the table while looping through the items.