:
$string = "10/06/2010 09:10:40 Work not yet started";
$regex = "/^(\d+)\/(\d+)\/(\d+) (\d+)\:(\d+)\:(\d+) (.+?)$/";
, , $matches.
$array, preg_match()
preg_match($regex, $string, $matches);
if (preg_match($regex, $string, $matches) > 0) {
}
:
$timestamp = mktime($matches[4], $matches[5], $matches[6],
$matches[2], $matches[1], $matches[3]);
$timestamp = mktime($matches[4], $matches[5], $matches[6],
$matches[1], $matches[2], $matches[3]);
, :
print date('r', $timestamp)
, :
$comment = $matches[7];
. , , , , . , / .