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

Is php a dying language?

951


Which is variable cost?

906


How can I find my php version?

964


What is a namespace in php?

922


How can we display information of a variable and readable by a human with php?

936


Explain what is the difference between session and cookie?

989


What does odbc do in context with php?

998


How is a constant defined in a PHP script?

989


What is the best way to change the key without changing the value of a php array element?

930


How we get ip address of client, previous reference page etc?

926


What is needed to be able to use image function?

949


What is cookies php?

914


What are the characteristics of php variables?

1030


What are hooks in php?

910


What do you mean by having php as whitespace insensitive?

943