Have fun with PHP arrays and date functions

Task is in comments - only $is_specific_date =='1' and $is_weekend =='1' need work.

if ($is_specific_date =='1')


// Push $start and $end into $dates_array[] as outbound ($start) and inbound ($end)


else if ($is_holiday =='1')


$sql = "SELECT country FROM `airport` WHERE iata = '$fromCode'";


$country = $con->query($sql);

$row = $country->fetch_assoc();

$country = $row['country'];

$sql = "SELECT (date - INTERVAL 1 DAY) AS outbound, (date + INTERVAL 2 DAY) AS inbound FROM `holidays` WHERE date> NOW() and date < (NOW() + INTERVAL 1 YEAR) and country like '$country' ";


$dates = $con->query($sql);

$dates_array[] = $row;

while( $row = mysqli_fetch_array($dates)){

$dates_array[$row['outbound']]['outbound'] = $row['outbound'];

$dates_array[$row['outbound']]['inbound'] = $row['inbound'];




else if ($is_weekend =='1')


echo $start;

echo $end;

echo $startw;

echo $endw;


Find all Thursdays and Sundays in between start and end. If start is less than today's date use today's date instead.

Save into array with Thursday as Outbound and Sunday as Inbound (see above)



Skills: PHP

See more: translate php arrays, php timezone date, php convert date, ajax php erase date mysql, php shipping date calculator, fun php project, php allow date range delivery, fun php scripts, php calculate date booking, populate date php mysql date picker, php curve text functions, php check date overlap, php insert date mysql database post, php parsing date time email usenet, infopath 2003 jscript date functions, using whois php expire date, php zip code functions

About the Employer:
( 186 reviews ) Palo Alto, United States

Project ID: #20033054

24 freelancers are bidding on average $29 for this job


**Dear** I am an expert of Web Development such as php(Symfony, WP,CI,Cake..),html,css,.net, and so on. Also i have a lot of experiences laravel, angular.js,react.js,node.js,vue.js, [login to view URL] and [login to view URL] I have do More

$35 USD in 1 day
(104 Reviews)

php mysql expert here with 7 years of experience in development. Ready to do this for you this task Thanks

$30 USD in 1 day
(212 Reviews)

we have been working in website industry for last 10 years.... we are ready to start [login to view URL] will you want to start? Just give us the chance to prove ourselves....... We have some questions to clarify,please rep More

$100 USD in 2 days
(161 Reviews)

Hello Sir/Mam, MAKSOF is a team of highly qualified professionals who is dedicated in providing creative solutions and innovative ideas for your business with our skills in technologies and strategies. We have r More

$25 USD in 1 day
(63 Reviews)

Hello hiring member i hope you are doing well i am bhavika i have 3+years experience in php , laravel ,ajax , jquery , javascript , html ,css , bootstrap so i can do it i can start it right now so please give me chance More

$25 USD in 1 day
(118 Reviews)

Hi, I am 8 years experienced web developer expert in PHP and MySQl . Have strong knowledge in HTML , CSS , JS, JQuery . I am able to work 40 hours in a week . I understand your points . Please check my recent projec More

$30 USD in 1 day
(85 Reviews)

Dear Sir. I am interested in your project. I'm senior Laravel, PHP, SQL, Javascript developer. I assure, I will do my best to work with you on your project to present the best possible outcome for you and your custo More

$50 USD in 0 days
(75 Reviews)

Hello! I am a web developer.(PHP expert) I have checked your project description. I can help you I will wait for your reply. Thank you.

$25 USD in 1 day
(13 Reviews)

Hi, I have 5+years Experience in Website/Software Design & Website Development. I'm an Expert in: -Frontend & Backend Development -Python -Data Science -Machine Learning -JVM technologies -Jquery, PHP -Ion More

$25 USD in 1 day
(34 Reviews)

Hi, I understand that you want the dates_array to populate based on is_specific_date or is_weekend. I understood your code. I only will need to give you the updated code. I have fair experience in PHP. Looking More

$10 USD in 0 days
(31 Reviews)

Hi, I just download your PHP file and looking into it. I can solve it right now. Looking forward to hear from you. Thanks

$20 USD in 1 day
(16 Reviews)

Hi Dear client. I am an expert with 12 years of experience in PHP and JavaScript. I am well-versed in PHP-extension (c++), V8 engine, PHP Javascript(v8js), Typescript, Ecmascript 6/7, angular, react and etc. Her More

$35 USD in 1 day
(2 Reviews)

Hello, After reviewing your project description, I assure confidently to assist your project with satisfactory results. Am keenly interested in this project. To check work at, visit: [portfolio cat="Wordpress"] More

$16 USD in 5 days
(7 Reviews)

Hi! Hope you are doing great. My name is Satyajit an expert in Web design and development. I have come to know that you needed support in your project. I would like to have the opportunity to discuss about the project More

$20 USD in 1 day
(10 Reviews)

Greetings, my name is Ahmad. I am Head of Client Relations and a web-developer myself. I would love to have an opportunity to discuss your project with you. With over 5 years of experience in mobile/web design and dev More

$20 USD in 7 days
(3 Reviews)

Hi. thanks for your posting. I'm very happy to have a chance of bidding your project. I have experience in the development of projects like yours. I have read carefully the descriptions and understood clearly what you More

$30 USD in 1 day
(2 Reviews)

Hi, Hope u’re doing fine. I am a senior php developer and i am very confident to deliver you this task with quality. Pls inbox me to discuss in detail. Looking forward to hearing from you. Thx Farhan

$25 USD in 1 day
(5 Reviews)

Hello Thanks to support this It,s pleasure to prefer recommendation for my job first. So the important thing what i want to show you is i have deep and flexbile experiences within PHP. Of course as you could get t More

$30 USD in 1 day
(1 Review)

Hello! I have read your description of a project. I'm a full stack web developer. I want to let you know that I have great experience in web development. I can professionally work on your project. I'm interested More

$25 USD in 1 day
(0 Reviews)

I read job description and I can do your project.I can even work on urgent basis and complete your project me for more information

$35 USD in 2 days
(0 Reviews)