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 the function mysql_pconnect() useful for?
Tell me what is the meaning of a final class and a final method?
Explain the difference b/w static and dynamic websites?
Can you use php and javascript together?
How to use http headers inside php?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
Explain different sorting function in php?
How to remove white spaces from the beginning and/or the end of a string in php?
What is use of isset function in php?
Tell me can you extend a final defined class?
What is $globals php?
How do functions work?
Which of the delimiter is ASP style?
How be the result set of mysql handled in php?
Explain me is multiple inheritance supported in php?