<?php $str = '2014-12-10T15:40:00'; function getOnlyTime($str = '') { $time = ''; if (empty($str)) { return $time; } return substr($str, 11); } echo getOnlyTime($str); ?>
You have javascript disabled. You will not be able to edit any code.