CodeIgniter Forums
Ranking Students and Get Positions - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Ranking Students and Get Positions (/thread-70507.html)



Ranking Students and Get Positions - real_divine - 04-19-2018

Good day sirs and mas.

Please. How can one rank students that have scores in various subjects.

Student A. English = 70, Maths= 87, History=57

Student B. English = 60, Maths= 67, History=58

Student C. English = 76, Maths= 88, History=56

Student D. English = 70, Maths= 57, History=97.

I want to  get student the one with the highest average and the average in percentage using codeigniter.

Help me out please.

Thanks


RE: Ranking Students and Get Positions - skunkbad - 04-19-2018

Doing math operations in CodeIgniter is just doing them in PHP:

http://php.net/manual/en/ref.math.php