Displaying even numbers in PHP

2
4
6
8
10
12
14
16
18
20
for($i=1;$i<=20;$i++){
if($i % 2 ==0){
echo $i;
echo '<br>'; // Line break
}
}

fmod()
All Basic Codes
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com











    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer