Try something like below
"2016-03-05","theadults"=>10),
array("thedate"=>"2016-03-05","theadults"=>1),
array("thedate"=>"2016-03-06","theadults"=>1),
array("thedate"=>"2016-03-07","theadults"=>1),
array("thedate"=>"2016-03-05","theadults"=>1),
array("thedate"=>"2016-03-07","theadults"=>1),
array("thedate"=>"2016-03-06","theadults"=>1)
);
print_r($array);
$new = array();
for($i=0;$i < count($array);$i++)
{
$index = -1;
for($j=0;$j";
print_r($new);