Here not required foreach looping.
$time = "1:30";
$array = explode(":", $time );
$array[0]; // this will have hour value, i,e., 1
$array[1]; // This will have minutes value i.e., 30
You can use those two values.
My suggestion you can use date function instead of exploding value.
you can get examples for date function in php manual .
www.php.net