how i get houre and minute of time?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
miki_ir
Forum Newbie
Posts: 3
Joined: Tue Sep 13, 2011 5:31 am

how i get houre and minute of time?

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: how i get houre and minute of time?

Post 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
Post Reply