I have table i wish to count how many times a value appears in all column the table structure
id Subject1 Subject1score subject1grade Subject2 Subject2score subject2grade
1 English 100 A Mathematics 100 C
HERES MY PREVIOUSLY TRIED CODE
<?php
$subject1grade='A';
$subject2grade='A';
$subject3grade='B'; $a=array("$subject1grade","$subject2grade","$subject3grade");
print_r(array_count_values($a));
?>
THE RESULT
Array ( [A] => 2 [B] => 1 )
I NEED THE CODE TO DISPLAY You made 2A(s), 1B(s)
I want to count how many A's and C's