This is from a wordpress query to see how many values in a custom table. Im hoping this will be the first step to doing simple pagination inside an admin page.
The array is stored inside $total
This is the output of print_r($total);
Array ( [0] => sCltdass Object ( [COUNT(*)] => 276 ) )
How do I store the number of rows in a variable so that I can do this: echo $countrows;
and it will output 276?
I keep trying variations of the following line:
$count = $total[0]->COUNT();
echo $count;
But nothing seems to work.