how can i draw pyramid with php?
<p>I can draw a pyramid using ASCII-art pyramid with the code below:</p>

<pre><code>&lt;center&gt;
&lt;?php 

$number = 10;

for($i=0;$i&lt;$number;$i++)
{
    for($a=0;$a&lt;$number-$i;$a++)
    {
        echo $i;
    }
    echo '&lt;br/&gt;';
}
?&gt;
&lt;/center&gt;
</code></pre>

<p>But if I set <code>$number</code> to something larger than 9 (e.g. 10), this will not work anymore, because 10 is made out of two characters. Therefor if the number consists of two characters and would originally be printed <code>n</code> times, it should only be printed n/2 times.</p>

<p>But I do not know how to do that, can you help me write it?</p>

<p>Sample output:</p>

<p><img src="http://i.stack.imgur.com/zqclj.png" alt="pyramid"></p>
