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

Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

954


Why does php need server?

989


How to create a directory?

1042


What is strstr php?

990


How to create reusable code in php?

1065


What is a composer?

972


Explain what is meant by pear in php?

1010


How we can retrieve the data in the result set of mysql using php?

1145


Tell me how can we automatically escape incoming data?

934


Which Scripting Engine PHP uses?

1184


Why post method is used in php?

1114


Is php a case sensitive language?

1166


Tell me how is the ternary conditional operator used in php?

1066


What is curl php?

1031


What are the benefits of composer?

1011