I'm trying to make PHP array and here is my example.
In each array first row is unique record number "[767962]"
After inside that array hotel room id 1st row.
2nd is hotel name
3rd and 4th are first price range between
5th is the price
Array
(
[767962] => Array /// --secial id for price record--//
(
[0] => 42923 /// --hotelroomid--//
[1] => Crystal Hotels Kemer Deluxe Resort /// --Hotel Name--//
[2] => 2013-04-01 /// --Start date--//
[3] => 2013-05-16 /// --End Date--//
[4] => 179 /// --Price --//
)
[767964] => Array
(
[0] => 42923
[1] => Crystal Hotels Kemer Deluxe Resort
[2] => 2013-05-17
[3] => 2013-05-26
[4] => 239
)
[767980] => Array
(
[0] => 42940
[1] => Rixos Deluxe Resort
[2] => 2013-03-02
[3] => 2013-05-26
[4] => 340
)
)
Here is the expected output.
I would like to know total price between that hotel room 2013-05-14 - 2013-05-21
1 , 42923 , Crystal Hotels Kemer Deluxe Resort , 2013-05-14 , 2013-05-21 , 1553
2 , 42940 , Rixos Deluxe Resort , 2013-05-14 , 2013-05-21 , 2380
For example 1553 is the total price between 2013-05-14 - 2013-05-21 dates.
2013-05-14 - 179
2013-05-15 - 179
2013-05-16 - 239
2013-05-17 - 239
2013-05-18 - 239
2013-05-19 - 239
2013-05-20 - 239
2013-05-21 - 239
Total is 1553