Above code will get users of current month but only those with status of βOkβ and order according to their date-of-joined from oldest to latest. Function returned an array which is stored in {$month_users} variable. Time to loop through array and display our users.