Write a php code which could be used to generate random
numbers between 1 - 100 and display them on the screen.
Answer Posted / shankar
<?php
$n=10;//number_of_numbers_required_to_display
for($i=0;$i<$n;$i++){
$num=rand(1,100);
echo $num;?>
<br/>
<?php
}
?>
Is This Answer Correct ? | 9 Yes | 4 No |
Post New Answer View All Answers
What is meant by ‘passing the variable by value and reference' in php?
Explain me what is the use of header() function in php?
What is php dependency injection?
Tell me what is mean by an associative array?
What is $_ get?
What is api used for?
How is it possible to know the number of rows returned in result set?
Explain what is the difference between $var and $$var?
What do you mean range() in php?
How to block direct directory access in PHP?
How do you find the length of a string in php?
Which is used to maintain the value of a variable over different pages?
What is compact function php?
How error handling is being handled by php?
How to get a random value from a php array?