how can i get Arrival Date and Departure Date from string?
Guest Name :WOLAK, KAMIL – Arrival Date: 2022-09-29 – Departure Date: 2022-10-06 – Ref: H242806
using php
how can i get Arrival Date and Departure Date from string?
Guest Name :WOLAK, KAMIL – Arrival Date: 2022-09-29 – Departure Date: 2022-10-06 – Ref: H242806
using php
2
Answers
You may use a regular expressions to match the format of yyyy-mm-dd:
output:
you will get the result as
Array ( [arrival_date] => 2022-09-29 [departure_date] => 2022-10-06 )