Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to create a directory?

1027


How long is session timeout?

996


Are react hooks stable?

929


What is a static method php?

997


Is php a case sensitive language?

1143


What do you mean by core php?

941


What is the importance of parser in php?

1195


What are the rules for naming a php variable?

1045


What is Apache's configuration file typically called?

1125


Tell me what is the importance of "action" attribute in a html form?

1099


When to use get and post request?

999


How is traits used in php?

987


What is the basic syntax of Php?

1147


What are magic constants in php?

1061


What is xss in php?

1000