Write a php code which could be used to generate random
numbers between 1 - 100 and display them on the screen.
Answer Posted / ashok
<?php
$n=10;//number_of_numbers_required_to_display
$num=rand(1,100);
for($i=0;$i<$n;$i++)
{
echo rand(1,100)."<BR>";
}
?>
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
What is $$ in php?
Tell me what is the definition of a session?
Do you know what is the difference between the include() and require() functions?
Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?
What is session and why do we use it?
What is the default time in seconds for which session data is considered valid?
Is not null mysql?
Where is the submitted form data stored?
What is use of header() function in php? What the limitation of header()?
Which function is used to strip whitespace?
What is interface? Why it is used?
Is php difficult to learn?
How is it possible to cast types in php?
What is the mysql injection?
What does $this do in php?