Guest User

Untitled

a guest
Sep 30th, 2018
1,821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $blacklist = ['@email.com', 'N/A', 'n.c@email.com', 'n.c@email.com'];
  2. $date = date('Y-m-d');
  3.  
  4. foreach ($results->data as $row) {
  5. $emails[] = $row->guestEmail;
  6. foreach ($blacklist as $b) {
  7. if (stripos($row->guestEmail, $b) !== false && date('Y-m-d', strtotime($row->endDate)) == $date) {
  8. $guests[] = array(
  9. 'FirstName' => $row->guestFirstName,
  10. 'LastName' => $row->guestLastName,
  11. 'email' => $row->guestEmail,
  12. 'country' => $row->guestCountry,
  13. 'check-in_date' => $row->startDate,
  14. 'check-out_date' => $row->endDate,
  15. );
  16. }
  17. }
  18. }
Add Comment
Please, Sign In to add comment