Sunamena Posted January 20, 2016 Share Posted January 20, 2016 I want to include something random by using php. How do i do this? I am very new to php.I will use it to display a random image, each has it's own unique url. Example:Hello, your lucky color is X. X is randomly chosen from a list and could be:RedOrange GreenBlueRedPink How would i do this?Thanks in advance =D Link to comment Share on other sites More sharing options...
justsomeguy Posted January 20, 2016 Share Posted January 20, 2016 You typically start with the mt_rand function to generate a random number, and go from there. http://php.net/manual/en/function.mt-rand.php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now