Page 1 of 1

Help Please

Posted: Mon Oct 14, 2002 8:43 am
by larissahp
Okay, I am trying to write an online racing game (for horses) but I need help with the winning times. I get the winning time in seconds.

For example:
winning time = 54.2333333333

I was wondering if there was a function that would display the winning time as follows:
0:54.23

Thankx,
Larissa

Posted: Mon Oct 14, 2002 9:10 am
by Phirus

Code: Select all

<?php

	$time = 54.2333333333;

	echo printf("%6.2f",$time);

?>
Hope that helps,

Phirus
?>