Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $blacklist = ['@email.com', 'N/A', 'n.c@email.com', 'n.c@email.com'];
- $date = date('Y-m-d');
- foreach ($results->data as $row) {
- $emails[] = $row->guestEmail;
- foreach ($blacklist as $b) {
- if (stripos($row->guestEmail, $b) !== false && date('Y-m-d', strtotime($row->endDate)) == $date) {
- $guests[] = array(
- 'FirstName' => $row->guestFirstName,
- 'LastName' => $row->guestLastName,
- 'email' => $row->guestEmail,
- 'country' => $row->guestCountry,
- 'check-in_date' => $row->startDate,
- 'check-out_date' => $row->endDate,
- );
- }
- }
- }
Add Comment
Please, Sign In to add comment