
Laurent_R
Enthusiast
Sep 28, 2012, 8:36 AM
Post #5 of 10
(1130 views)
|
|
Re: [HarryAchterdeur] New Program
[In reply to]
|
Can't Post
|
|
Rather than using so many variables ($input1, $input2, $input3, ...$elapsed1, $elapsed2, ..., $start1, $start2)), I think you should at least use a series of arrays. For example, $input[1], $start[1], etc., and loop on the indices. That would enable you to reduce drastically the code replication (thereby limiting the risk of errors). In fact a more complex data structure (array of hashes or hash or arrays) would probably be better, but at the very least, use arrays for those three series of variables.
|