How can i get multiple details from a table instead of one id, i get more data with the table with if..... more explanation and code below
id | class | gender | score | date
-----------------------------------------------------------------------------------
1 | pry1 | male | ,first, first, first | ,2019-12-04,2019-11-21,2019-11-20
2 | pry2 | female | ,second, second, second | ,2019-12-04,2019-11-21,2019-11-20
3 | pry3 | male | ,first, first, first | ,2019-12-06,2019-12-13,2019-12-19
4 | pry4 | male | ,third, third, third | ,2019-12-20,2019-12-20,2019-12-20
5 | pry5 | female | ,second, second | ,2019-12-24,2019-12-24,2019-12-24
////////i selected e1view from the database /////////////
if (substr_count($e1view, ",") <'3')
{
$last=0;
}
elseif (substr_count($e1view, ",") =='3' OR $m1==='0') {
$last = ltrim(strrchr($e1view,','),',');
if ($last =='first') {
$last=1;
}
else if($last=="second"){
$last=2;
}
else if($last=="third"){
$last=3;
}
i want to get the details of only the male students using and add their scores individually.... and get the final score into a variable. like
$finalScoreforallmaleStudent = 5;