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

<?php
$n=10;//number_of_numbers_required_to_display

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

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What enctype is required for file uploads to work?

1035


What does $this do in php?

971


What are the encryption functions available in PHP?

1135


What is the difference between the functions strstr() and stristr()?

986


How can we execute a php script using command line?

1055


How is it possible to remove escape characters from a string?

1129


What are the correct and the most two common way to start and finish a PHP block of code?

1069


How to convert numbers to strings in php?

1027


What is the use of friend function in php?

979


Describe the security vulnerability of PHP?

1046


Differences between get and post methods?

1044


What is php full form?

1071


Will php die?

963


What beforeFilter() is used?

1118


What is php used for?

966