I\'m new to PHP and trying to create the following whilst minimizing the amount of code needed. PHP should show a list of 100 then display if the number is / by 3, 5 or 3 and 5.
Update the code as given below
$number "; if($number % 3 == 0 && $number % 5 == 0) { echo "BY3 AND 5"; } elseif ($number % 5 == 0) { echo "BY5"; } elseif ($number % 3 == 0) { echo "BY3"; } echo ""; } ?> 0 讨论(0) 查看其它9个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题