Outputting price depending on different prices in different time spans based on array of dates

     

Supposing I have the following array containing all the dates from one date to another (I used print_r and

 to echo it) and mysql data defining the price for a certain apartment during a specific season:


PHP


Array  (   [0] => 2018-03-29   [1] => 2018-03-30   [2] => 2018-03-31   [3] => 2018-04-01   ...   [86] => 2018-06-23   [87] => 2018-06-24  )  

MySQL


(image)


I would like to create a function which generally outputs the price for the days in the apartment "generally" meaning indepently from the year. Therefore the year in the databank represents an arbitrary value. Unfortunately I couldn't figure a way out as to how to output the desired result which in this case would be 5