I've a string like below
$num = "20142311.235504";
I want to split the string in below format
$date['year'] = 2014;
$date['Month'] = 23;
$date['day'] = 11;
$date['hour'] = 23;
$date['min'] = 55;
$date['sec'] = 04;
or even in date form like below
2014/23/11 23:55:04
I tried using preg_split('/(d{4})/',$num,$matches);
and str_split
but am not getting the desired output. Your help is highly appreciated.