I have a time \"7:00 am\" that I need to split into $hour, $min, $ampm. Is there an easy way that I can split this in to 3 variables?
$hour
$min
$ampm
$a = preg_split('/[: ]/', '7:00 am'); $hour = $a[0][0]; $minute = $a[1][0]; $ampm = $a[2][0];