Write a php code which could be used to generate random
numbers between 1 - 100 and display them on the screen.

Answer Posted / anjithkumar.garapati

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

Is This Answer Correct ?    25 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the three parts of an http request?

653


What are helpers in php?

563


Is key in array php?

658


What is difference between action hook and filter hook?

569


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

567






What is inheritance in php with example?

640


Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?

638


Tell me what does the scope of variables means?

608


Why would we use === instead of ==?

8445


What is the difference between "echo" and "print" in php?

608


What is a php web application?

587


What kind of things have you done on the social side?

8669


How to break a file path name into parts?

611


Define metaphone()?

8378


Is empty java?

638