Write a php code which could be used to generate random
numbers between 1 - 100 and display them on the screen.

Answer Posted / yatin

<?php
$n=100; //number_of_numbers_required_to_display

for($i=0;$i<$n;$i++)
{
$num=rand(1,100);
echo $num."<br>";}
?>

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you submit a form without a submit button?

531


How to write php function in html onclick?

529


Is nan in php?

532


What are the common uses of php?

565


Is php front end?

511






What is the difference between pop3 IMAP and MAPI?

643


How to check an key is exists in array?

557


What is polymorphism in php?

515


What is csrf token and how it works?

532


How could I install codeignitor ?

1745


Does php have multiple inheritance?

515


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

531


Is php session id unique?

534


How to enable cURL in PHP?

659


What is the advantage of runtime polymorphism?

513