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 / 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


Please Help Members By Posting Answers For Below Questions

What is $$ in php?

905


Tell me what is the definition of a session?

973


Do you know what is the difference between the include() and require() functions?

935


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

981


What is session and why do we use it?

1000


What is the default time in seconds for which session data is considered valid?

1051


Is not null mysql?

897


Where is the submitted form data stored?

1014


What is use of header() function in php? What the limitation of header()?

923


Which function is used to strip whitespace?

909


What is interface? Why it is used?

967


Is php difficult to learn?

883


How is it possible to cast types in php?

916


What is the mysql injection?

944


What does $this do in php?

917