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

What is difference between mysql_fetch_array and mysql_fetch_assoc?

579


Why do we use csrf token?

597


What is php glob?

651


What percentage of websites use php?

585


for image work which library?

638






Which is better php or nodejs?

589


How to call a php function from html button?

683


How can we change the value of a constant?

615


can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????

1418


Tell me what is the use of "enctype" attribute in a html form?

652


Explain the difference between require() and require_once()?

596


What are objects in php?

617


How we load all classes that placed in different directory in one php file , means how to do auto load classes.

576


Is php deprecated?

605


What is final class and final method?

654