php reads mysql id shows 01 02 03
<p>I wanna php output my mysql 1 as 01, 2 as 02.... and so on,
so I get database ID first then I wrote this code for output</p>

<pre><code>if ($id &lt;10) {
    echo '0'.$id;
} else {
    echo $id;
}
</code></pre>

<p>and then I want to insert $id to my class then in a loop</p>

<pre><code> while ($sth &lt;100) {
     $id = mysql_result($result,$mtt,"ID");
     echo "&lt;div class='active_$id'&gt;$info&lt;/div&gt;";

  $sth++
}
</code></pre>

<p>how should i replace </p>

<pre><code>if ($id &lt;10) {
    echo '0'.$id;
} else {
    echo $id;
}
</code></pre>

<p>to <code>$id</code>? </p>
