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

Is php open source?

1001


What changes I have to do in php.ini file for file uploading?

1073


Difference between array_combine and array_merge?

1172


What is the difference between characters 23 and x23?

1001


What are php loops?

979


What is substr() in php? And how it is used?

1050


What is interface? Why it is used?

1040


Can you use both this () and super () in a constructor?

1008


What does $_server mean?

1006


Write syntax to open a file in php?

1051


How will you calculate days between two dates in PHP?

1076


What is the difference between die () and exit () in php?

988


What are the advantages of object-oriented programming in php?

928


How does api connect to database?

1077


Write a statement to show the joining of multiple comparisons in php?

1017