Assign numeric results from query to text from array
<p>I'm just learning PHP and I've searched for a while on this, but I'm afraid I may not know exactly how to ask it, so an explanation will probably work best.  Basically I have a group by/count query returning 3 records.</p>

<pre><code>Status    Total
  0         2
  1         3
  2         2
</code></pre>

<p>On my page I would like to display:</p>

<pre><code>Status          Total
 Dev             2
 Active          3
 Arch            2
</code></pre>

<p>So I basically just want to assign the values 0, 1 and 2 to a text value.  I've tried creating an array, then assigning the return number field equal to the array.</p>

<pre><code>$_status = array(0 =&gt; 'Development', 1 =&gt; 'Production', 2 =&gt; 'Archive');

while($rowStat = mysql_fetch_assoc($resDev))
{
    echo "&lt;tr&gt;&lt;td&gt;$_status[$rowStat['status']]&lt;/td&gt;&lt;td&gt;{$rowStat['devprojects']}&lt;/td&gt;&lt;/tr&gt;";
};
</code></pre>

<p>Any help is much appreciated.</p>

<p>Thanks.</p>
