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

Answer Posted / solutio magister

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

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between php4 and php5?

674


How can we define a variable accessible in functions of a php script?

637


What is the use of curl()?

716


Is php easy language to learn?

671


Explain php split() function.

622






Is nan in javascript?

614


How do you end a function in python?

612


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

596


How to copy a file?

647


What does the unlink() function mean?

661


What is the value for this auto incremented field user_pri_id?

589


How many php functions are there?

615


Is php free to use?

630


What is cookie and session in php?

588


What are the differences between require and include?

642