Articles → PHP → rand() function in php

rand() function in php






Purpose





Example


<!DOCTYPE html>
<html>

<body>
	<?php
echo(rand() . "<br>");
echo(rand(10,100)); 

?>
</body>

</html>



Output


Picture showing the output of rand function in php

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, September 27, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250