I have a for loop like this in php
<?php
for($i=0;$i<=100;$i++)
{
echo $i;
}
What I need is, I want to generate roll number using this for loop like this.
SN0001
SN0002
SN0003
.....
SN0010 not SN00010
......
SN0100 not SN000100
I have tried this
<?php
for($i=0;$i<=100;$i++) {
$str='SN00'.$i;
echo $str;
}
?>
Note this (SN0010 and SN0100). I need SN0010,SN0100 not SN00010, SN000100.
What should I do for that?