$time_str = '2013-09-03 03:29:11' ;
preg_match('/([0-9]+)-([0-9]+)-([0-9]+) (.*)/', $time_str, $matches);
$new_str = $matches[3] . '-' . $matches[1] . '-' . $matches[2] . ' ' . $matches[4];
When I check the value of $new_str I get
$new_str = 03-2013-09 03:29:11
but when I check the value of strtotime($new_str)
I get an empty value for $str
where $str = strtotime($new_str)