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

How do I run a php program in dreamweaver?

985


Which function gives us the number of affected entries by a query?

879


What is the sign to start variables in PHP?

1020


What is the differences between $a != $B and $a !== $B?

993


What is binary safe function in php?

1003


Explain what are the three classes of errors that can occur in php?

920


What is the method to register a variable into a session?

794


How to close a session properly?

917


What beforeFilter() is used?

1055


What is dao in php?

920


Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

939


How be the result set of mysql handled in php?

1099


What is session and why do we use it?

1000


What are sql injections, how do you prevent them and what are the best practices?

984


What is if isset ($_ post submit )) in php?

968