<?php $dateTime = '2007-01-11'; preg_match('~(?<date>\d{4}-\d{2}-\d{2})\s?(?<time>\d{2}:\d{2}:\d{2})?~', $dateTime, $matches); var_dump($matches);
You have javascript disabled. You will not be able to edit any code.