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 the function mysql_pconnect() useful for?

942


Tell me what is the meaning of a final class and a final method?

1114


Explain the difference b/w static and dynamic websites?

1006


Can you use php and javascript together?

1019


How to use http headers inside php?

1045


With a heredoc syntax, do I get variable substitution inside the heredoc contents?

1082


Explain different sorting function in php?

1064


How to remove white spaces from the beginning and/or the end of a string in php?

975


What is use of isset function in php?

1040


Tell me can you extend a final defined class?

1044


What is $globals php?

1008


How do functions work?

1101


Which of the delimiter is ASP style?

1079


How be the result set of mysql handled in php?

1146


Explain me is multiple inheritance supported in php?

1061