sheryprince Posted September 19, 2011 Share Posted September 19, 2011 Hello Friends.... I m in a trouble again..... the problem is that i am developing a student management system. every thing was going well bu now at this very moment i am stuck at point and can not find a way out... plz help me out! i am making a module which will keep the record of students test results and will be fetched as per need. the main problem is that i have three fields in the table where one have the total mark, second have the obtained marks and the third one is blank i want to take the percentage and place it in the third (Blank one) field..... My head is blowing out ...... friends PLZZZZZZZZZ help me out! :'( Link to comment https://forums.phpfreaks.com/topic/247416-find-percentage/ Share on other sites More sharing options...
btherl Posted September 19, 2011 Share Posted September 19, 2011 Would it be Percentage = O / T * 100 Where O = obtained marks and T = total marks? Link to comment https://forums.phpfreaks.com/topic/247416-find-percentage/#findComment-1270583 Share on other sites More sharing options...
sheryprince Posted September 19, 2011 Author Share Posted September 19, 2011 Thanks Btherl ! for you reply.... but plz coud you explain it a little more i m new to php and dont know so much plz help me out guyzzzzzzz! Link to comment https://forums.phpfreaks.com/topic/247416-find-percentage/#findComment-1270603 Share on other sites More sharing options...
xyph Posted September 19, 2011 Share Posted September 19, 2011 guyzzzzzzz? By table, do you mean a database table or an HTML table? It's simple math. echo '%' . round( $obtained / $total * 100 ); Link to comment https://forums.phpfreaks.com/topic/247416-find-percentage/#findComment-1270710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.