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

Answer Posted / solutio magister

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

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the new features available in php 7?

548


How can you send http header to the client in php?

505


What is parent __construct ();?

543


List data types in PHP?

541


Is php a cms?

534






How do you display the output directly to the browser?

473


What are the three parts of an http request?

576


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

8590


Do you know what is the differences between $a != $B and $a !== $B?

504


Explain about getters and setters in php?

536


What is the use of strpos in php?

563


What is cms php?

509


How can I load data from a text file into a table?

572


What is difference between md5 and SHA256?

541


What does the scope of variables means?

588