I wanted to have a set of Random PHP variables that are set constant for a single day.
Example:
// TODAY's DATE
$todaysdate=date("Ymd");
// RANDOM VARIABLES
$a=rand(1,10);
$b=rand(101,110);
$c=rand(1001,1010);
echo "$a | $b | $c";
Under the normal rules for random variables, each visitor for a web page would receive a random set of numbers. So on April 19, by hitting refresh you may see the following
5 | 108 | 1002
1 | 109 | 1006
10 | 101 | 1004
etc etc...
I want the variable to be set for a single day, to change randomly the next day and be set for that day, and so on.
April 19, 2009 Results:
5 | 108 | 1002
5 | 108 | 1002
5 | 108 | 1002
each refresh page is consistent.
April 20, 2009 Results:
1 | 109 | 1006
1 | 109 | 1006
1 | 109 | 1006
each refresh page is consistent.
April 21, 2009 Results:
10 | 101 | 1004
10 | 101 | 1004
10 | 101 | 1004
each refresh page is consistent.
Now how do I do this? I don't want to use MySQL for this. I want to keep the processes simple and within PHP.
Thanks.