Display mysql query string into tabular form
<p>Not sure how to do this. The code below does not work.</p>

<p>From the function <code>getRecords()</code></p>

<pre><code>$result = mysql_query('SELECT * FROM partners'); 
return $result;
</code></pre>

<p>And this where I want to display</p>

<pre><code>&lt;?php $records = getRecords(); ?&gt;
    &lt;table&gt;
        &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;Partner name&lt;/td&gt;
            &lt;td&gt;Username&lt;/td&gt;
            &lt;td&gt;Password&lt;/td&gt;
            &lt;td colspan="2"&gt;Actions&lt;/td&gt;
        &lt;/tr&gt;
        &lt;?php
            if (isset($records)) {
                foreach ($records as $record) {
                    $row = '&lt;tr&gt;'
                        . '&lt;td&gt;' . $record['partner']. '&lt;/td&gt;'
                        . '&lt;td&gt;' . $record['username']. '&lt;/td&gt;'
                        . '&lt;td&gt;' . $record['password']. '&lt;/td&gt;'
                        . '&lt;/tr&gt;';
                    echo $row;
                }
            }
        ?&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;
</code></pre>

<p>I hope you get the idea. What am I missing?</p>
