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

Which framework is best for php development?

494


What are the main error types in php?

524


How to fix "headers already sent" error in php

548


How to create connection in php?

529


What is the purpose of break and continue statement?

527






Is php a float?

543


What is "print" in php?

530


Is php a programming language?

555


What are the different types of array in php?

518


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

536


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

548


Why is overriding runtime?

577


How do I check environment variables?

533


Tell us what is the difference between session_unregister() and session_unset()?

560


How to remove duplicate values from a PHP Array?

547