Generating a Random Number Within a Range in PHP


Create a random number within a specific range using rand().

Source Code

echo rand(1, 10); // Outputs a random number between 1 and 10
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments