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 PHP function would you use to send an email?

1047


How many types of errors in php?

1074


Is php faster than javascript?

953


Does php have block scope?

971


Explain the difference between require() and require_once()?

975


Name and explain five of the PHP error constants?

963


What exactly is validating and sanitizing?

1037


Explain the difference between array_merge() and array_combine()?

1003


What is polymorphism in oop php?

1012


Can you convert php to html?

986


What is the use of trim function in php?

981


What is the difference between php traits vs interfaces?

982


Why do we use interface in php?

979


Explain Type juggling?

998


What is a php array?

1018