Q:

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

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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:

50,54,58,62,66,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now