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

<?php
$n=100; //number_of_numbers_required_to_display

for($i=0;$i<$n;$i++)
{
$num=rand(1,100);
echo $num."<br>";}
?>

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which function can be used to exit from the script after displaying the error message?

903


Where is session value stored php?

970


How easy is php?

905


What is escaping to php?

933


What is static variable in php?

1045


Can I learn php in a month?

1003


Which is useful for method overloading?

1091


How does php work with apache?

990


Who developed php?

933


How do you check if an arraylist is empty?

941


Explain what does the expression exception::__tostring means?

827


Can you explain, when to use if-else if-else over switch statements?

964


What software is required for php?

997


How many types of array supported in php?

935


What is the difference between == and === operator in PHP?

920