Hi, I have a time picker field which is outputting in H:i format (i.e. 18:33) and i’m wondering if I am able to split this in to 2 variables, for $hour and $mins?
I am having real trouble trying to code an open/closed indicator based on time picker fields for opening times.
Thanks.
See:
https://www.php.net/manual/en/function.list.php
https://www.php.net/manual/en/function.explode.php
// create and set a value for hour and minute from H:i
list($hour, $minute) = explode(':', $value);