| Author |
How to assign random string value to variable in PHP5
|
Ramakanta Sahoo
Ranch Hand
Joined: Aug 23, 2008
Posts: 235
|
|
Hi All,
I have something like below. want to use any of the random values each time any query happens.
when I tried to run it gave me a error like below
Parse error: syntax error, unexpected '('
I just want to rotate the usernames when ever I query for $user , can you please let me know how to achieve this.
I'm very new to PHP so please bear with my silly syntax questions
|
Regards, Ricky
Oracle Weblogic 10g Certified Expert
TechBlog
|
 |
Unnar Björnsson
Ranch Hand
Joined: Apr 30, 2005
Posts: 164
|
|
If I understand you correctly you want to retrieve a random value from $abc each time an instance of the class is created, in that case you would use rand(minvalue, maxvalue) i.e:
|
 |
 |
|
|
subject: How to assign random string value to variable in PHP5
|
|
|