I have an array of dates: from and to ‘s.
i.e:
array(
[0] => array('from' => '19-01-2000' 'to' => '20-01-2000')
[1] => array('from' => '20-01-2000' 'to' => '21-01-2000')
[2] => array('from' => '21-01-2000' 'to' => '22-01-2000')
[3] => array('from' => '23-01-2000' 'to' => '24-01-2000')
[4] => array('from' => '24-01-2000' 'to' => '25-01-2000')
)
I am trying to find a way to convert create a new array which will only have the date ranges,
i.e:
array(
[0] => array('from' => '19-01-2000' 'to' => '22-01-2000')
[1] => array('from' => '23-01-2000' 'to' => '25-01-2000')
)
Any suggestions?
I’ve solved it in the following way.
$new_array now contains only the date ranges.