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
Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
Why does php need server?
How to create a directory?
What is strstr php?
How to create reusable code in php?
What is a composer?
Explain what is meant by pear in php?
How we can retrieve the data in the result set of mysql using php?
Tell me how can we automatically escape incoming data?
Which Scripting Engine PHP uses?
Why post method is used in php?
Is php a case sensitive language?
Tell me how is the ternary conditional operator used in php?
What is curl php?
What are the benefits of composer?