Get Fetch_Assoc results by numerical index
<p>Is there a way to access the results of 'fetch_assoc()'<br />
by number? For instance, I'd expect the following to give me <br />
<br />1.) Array
<br />2.) 25
<br />3.) 'First Element'
<br />
Instead, it throws the following error:<br/>
<br/>
Notice: Undefined offset: 0 in C:\xampp\htdocs_notesale\index.php on line 22
<br/><br/>
Any idea how to do this?<br>thanks<br>JW</p>

<pre><code>&lt;?php
$db = new mysqli('CONN','USER','PW','DB');
$rs = $db-&gt;query("SELECT * FROM `checklist`");
$r_count = $rs-&gt;num_rows;
$c_count = $rs-&gt;field_count;
</code></pre>

<p><code>?&gt;</code>
<code>...</code></p>

<pre><code>    &lt;?php
        for($i=0;$i&lt;$r_count;$i++)
        {
        $row = $rs-&gt;fetch_assoc();
        echo "&lt;tr&gt;";
            echo "1 - ".$row."&lt;br /&gt;";
            echo "2 - ".count($row)."&lt;br /&gt;";
            echo "3 - ".$row[0]."&lt;br /&gt;";
            echo "&lt;/tr&gt;";
            }
        ?&gt;
</code></pre>
