View Single Post
Old 12-10-2007, 10:13 AM   #3 (permalink)
Haris
The Frequenter
Prolific Welcomer Upcoming Programmer 
 
Join Date: Sep 2007
Posts: 360
Thanks: 24
Haris is on a distinguished road
Default

Quote:
Originally Posted by meshi View Post
hi guyz i need ur help!!

how could i convert the time format for example i have a time 4:56 pm and i want to convert it in 16:56 so that the if i query it from the database it displays the result.?
php Code:
$szTime = date("G:i:s", strtotime("4:56 PM"));

Quote:
Originally Posted by meshi View Post
on more thing how would i iterate in this format

00
01
02
03
04
05
06
07
08
09
if i use this:
for (i=0;i>10;i++)

the result would be
123456789

how would i put 0's in my iteration so that it would be 2 numbers?
php Code:
foreach(range(1, 200) as $iInteger)
{
    sprintf("%02d", $iInteger);
}
__________________
Necessity is the mother of invention.

My blog

Last edited by Haris : 12-11-2007 at 02:42 AM.
Haris is offline  
Reply With Quote
The Following 2 Users Say Thank You to Haris For This Useful Post:
Geert (12-10-2007), Wildhoney (12-10-2007)