I have a major project I am trying to think through and set up some trial run codes for in order to be sure I have the setup correct before I lay down thousands upon thousands of lones of code. Anyhow, I'll probably be on here a lot until I finish.
Okay, the project is to create a table that calculates paces based off of data entered by a user. The data I can handle. In fact, the calculations are pretty straightfoward. However, I don't know how to get around a return value problem. When the user enters data I have it seperated into 3 text boxes, one for hours, one for minutes and one for seconds. Once I get the data from there, I am able to perform the necessary calculations which leaves me with integers. Now, I need to get these integers into minutes and/or seconds. I did this program in Excel, which is really easy to manipulate the data. However, I don't want to have 8,000+ if/then clauses for each entry. The main issue is, when I go from integers (say 300 seconds) to time (5:00.00), I have to find the the minutes (modulus(time), 60 seconds) and seconds (fixed(time),2). I have no idea how to approach this in PHP...yet. Also, if there is an easier way around this type of approach, I would love to see it because there are all sorts of issues with the conversions from and to decimal formats that require extensive if/then coding, most of which is probably redundant and unnecessary.
Any help would be greatly appreciated.
Willl