Jump to content

random string doesn't work


wesley

Recommended Posts

Hello,I have make a random string with a array. The letters A, B and C are in a array.The letters must be see random in the browser, all three next to each other. But this doesn't work. Now the letters ABC are static in the browser and not random if you refresh the page.Can someone help me? How can I get the letters random?thanks in advcance.my code is:

<?php$a=array("A","B","C");$random_keys=array_rand($a, 3);echo $a[$random_keys[0]];echo $a[$random_keys[1]];echo $a[$random_keys[2]];
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...