I have an array of dates as listed below:
$date_events = array(
0 => 'Lundi, janvier 30, 2017',
1 => 'Mardi, janvier 24, 2017',
2 => 'Mardi, janvier 17, 2017',
3 => 'Mardi, janvier 10, 2017',
4 => 'Mercredi, janvier 25, 2017',
5 => 'Lundi, janvier 2, 2017',
6 => 'Dimanche, janvier 1, 2017',
7 => 'Mardi, janvier 3, 2017',
8 => 'Lundi, février 13, 2017'
);
I want to convert these days in "d-m-Y" Format.Everything is working fine when the dates are in English, but my problem is with French date that is not being converted and returning '01-01-1970'. I am using below code:
for( $i=0 ; $i < count($date_events) ; $i++){
$time = strtotime($date_events[$i]);
$newformat[] = date("d-m-Y",$time);
}
Can someone help me out with this date conversion for French?