Page 1 of 1

how i get houre and minute of time?

Posted: Thu Sep 22, 2011 12:38 am
by miki_ir
hi
i have field in database in type of time .
i want to insert hour in one variable and minute in other var
08:09:10
i want
$h <----8:0
and
$m<------09

and then i want work with $h and $m like integer . this possible?
how do it
thanks

Re: how i get houre and minute of time?

Posted: Thu Sep 22, 2011 2:25 pm
by califdon
I have moved your topic to PHP - Code forum.

Yes, everything is possible in PHP. Read how "time" works in PHP: http://php.net/manual/en/function.time.php