Hi everyone,
In my CakePHP app, I'm pulling in the results of a table called 'Timesheets'. This table has an athlete_id and a few split times for a race. I need to do some calculations on one athlete's times compared to another athlete (for instance, calculate the difference between the fastest finish time and slowest).
I thought the best way to do this would be to store every athletes 'finish' in a new array, then run the min() function on it. For the life of me, I can't get this to work...
Do you think I am approaching this the wrong way, or am I just missing something?
foreach ($timesheet['Run'] as $run): <tr<?php echo $class;?>> <td><?php echo $run['athlete_id'];?></td> <td><?php echo $run['start'];?></td> <td><?php echo $run['split1'];?></td> <td><?php echo $run['split2'];?></td> <td><?php echo $run['split3'];?></td> <td><?php echo $run['split4'];?></td> <td><?php echo $run['split5'];?></td> <td><?php echo $run['split6'];?></td> <td><?php echo $run['finish'];?></td> </tr> endforeach
Name (required)
Mail (will not be published) (required)
Website