15 lines
144 B
PHP
15 lines
144 B
PHP
<?php
|
|
|
|
$i = 0;
|
|
$sum = 0;
|
|
|
|
for ($i; $i < 1000; ++$i) {
|
|
if ($i % 3 == 0 or $i % 5 == 0) {
|
|
$sum = $sum + $i;
|
|
}
|
|
}
|
|
|
|
echo "\n" . $sum . "\n";
|
|
|
|
?>
|