I'm trying to echo stars and zero like the pattern below
*
***0
******00
**********000
However I'm getting this result
*
**0
***00
****000
*****0000
******00000
here is my code
for ($i=0; $i<=10; $i++)
{
echo "*";
for ($j=0; $j<$i; $j++)
{
echo "*";
}
for ($z=0; $z<$i; $z++)
{
echo "0";
}
echo "</br>";
}
?>