I have a db table that contains time in the following format hhmm.
I need to split hour from minutes. I think I can use something like
substr($time, 0, 2);
It works well when my time looks like: 1430
, however I'm not sure what to do when I have something like 710
.