How to get count(*) on PHP?
<p>I have a following outputs from MySQL.</p>

<pre><code>Array
(
[0] =&gt; stdClass Object
    (
        [id] =&gt; 19
        [date] =&gt; 2010-10-04 11:00:00
        [course] =&gt; Yoga
        [course_id] =&gt; 19
        [count(*)] =&gt; 2
        [capacity] =&gt; 20
    )

[1] =&gt; stdClass Object
    (
        [id] =&gt; 20
        [date] =&gt; 2010-10-04 13:00:00
        [course] =&gt; Spin
        [course_id] =&gt; 20
        [count(*)] =&gt; 1
        [capacity] =&gt; 24
    )
...
...
</code></pre>

<p>I can get date, course etc, but I am not sure how to get count(*) with PHP.</p>

<pre><code>foreach ($bookingnum as $key =&gt; $list){
    echo "&lt;tr valign='top'&gt;\n";
    echo "&lt;td align='center'&gt;".$list-&gt;date."&lt;/td&gt;\n";
            echo "&lt;td align='center'&gt;".$list-&gt;course."&lt;/td&gt;\n";
          //  echo "&lt;td align='center'&gt;".$list-&gt;count(*)."&lt;/td&gt;\n";
         // this is wrong. how to get count(*)?? 
 ....
 ...
</code></pre>
