Thread: time to seconds
View Single Post
  #1  
Old 08-11-2006, 02:38 PM
kiefer kiefer is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kiefer is on a distinguished road
Default time to seconds

Hello,

I am writting a script that uses a flash player to tell the user what time the song is at. Well not being good with flash i finaly found a player I llike. The only prpblem is it uses 100 seconds for actually 60 seconds. Listed is an example of code below

//The timer i want to stop at is 1.58 basically 158.
$total = 100 + 58 / 1.6666666666666666666666666666667;
$time = round($total, 0); // This equals 135 which in realiaty is 1 minute 35 seconds.

What i want is how to convert the 136 to seconds.
If i could get the $time to equal 1:35 then i can just exploed the variable and times it by 60 but how can i explode the first number. Or actually the last two to be safe incase there are four numbers total. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - time to seconds
Thread: time to seconds
View Single Post
  #1  
Old 08-11-2006, 02:38 PM
kiefer kiefer is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kiefer is on a distinguished road
Default time to seconds

Hello,

I am writting a script that uses a flash player to tell the user what time the song is at. Well not being good with flash i finaly found a player I llike. The only prpblem is it uses 100 seconds for actually 60 seconds. Listed is an example of code below

//The timer i want to stop at is 1.58 basically 158.
$total = 100 + 58 / 1.6666666666666666666666666666667;
$time = round($total, 0); // This equals 135 which in realiaty is 1 minute 35 seconds.

What i want is how to convert the 136 to seconds.
If i could get the $time to equal 1:35 then i can just exploed the variable and times it by 60 but how can i explode the first number. Or actually the last two to be safe incase there are four numbers total. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote