[ create a new paste ] login | about

Link: http://codepad.org/78d2aAKp    [ raw code | output | fork ]

kostis - PHP, pasted on Nov 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div>
<?php

for($i=0;$i<6;$i++)
{
    
    if($i%3 == 0 && $i > 0)
    {
        echo "</div>\r\n<div>\r\n";
    }
    echo "<p>modulus => ".($i%3)."</p>\r\n";

}

?>
</div>


Output:
1
2
3
4
5
6
7
8
9
10
<div>
<p>modulus => 0</p>
<p>modulus => 1</p>
<p>modulus => 2</p>
</div>
<div>
<p>modulus => 0</p>
<p>modulus => 1</p>
<p>modulus => 2</p>
</div>


Create a new paste based on this one


Comments: