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
Is php a dying language?
Which is variable cost?
How can I find my php version?
What is a namespace in php?
How can we display information of a variable and readable by a human with php?
Explain what is the difference between session and cookie?
What does odbc do in context with php?
How is a constant defined in a PHP script?
What is the best way to change the key without changing the value of a php array element?
How we get ip address of client, previous reference page etc?
What is needed to be able to use image function?
What is cookies php?
What are the characteristics of php variables?
What are hooks in php?
What do you mean by having php as whitespace insensitive?