Write a PHP script which displays all the numbers between 50 and 150 that are divisible by 4

Introduction

PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..

<?php
 echo implode(",",range(50,150,4))."\n";
?>

Result

Write a PHP script which displays all the numbers between 50 and 150 that are divisible by 4
Write a PHP script which displays all the numbers between 50 and 150 that are divisible by 4

Leave a Comment