I want to write row number by point rating. But I can't do it this for last point.
<?php
$self=$db->query("SELECT * FROM table ORDER BY exam_name DESC");
$a1=1;
foreach ($self as $order)
{
if($order['exam_name']==$gb['exam_name']) //$gb = selected exam by user id
{
echo $a1;
break;
}
$a1++;
}
?>