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 enctype is required for file uploads to work?
What does $this do in php?
What are the encryption functions available in PHP?
What is the difference between the functions strstr() and stristr()?
How can we execute a php script using command line?
How is it possible to remove escape characters from a string?
What are the correct and the most two common way to start and finish a PHP block of code?
How to convert numbers to strings in php?
What is the use of friend function in php?
Describe the security vulnerability of PHP?
Differences between get and post methods?
What is php full form?
Will php die?
What beforeFilter() is used?
What is php used for?