$storedArray=Array
("horscopeCategory1" => "you are going to marry this week",
"horscopeCategory2" => "you will be rich this week",
"horscopeCategory3" => "your wife will beat you up for sure",
"horscopeCategory4" => "are u sure? she knows you are secretly using messengers. reduce!",
"horscopeCategory5" => "the more you give the more you will get. start giving MORE today!"
"horscopeCategory1" => "you are going to marry this week",
"horscopeCategory2" => "take care of your health, i see some bad sign this week coming at ya",
"horscopeCategory3" => "little things in life is what makes it beautiful",
"horscopeCategory4" => "life is what is and you are doing a great job",
"horscopeCategory5" => "you will be getting a promotion soon, keep coding dude"
"horscopeCategory1" => "when the life is hard consider problems are different",
"horscopeCategory2" => "go ahead give a dollar to lotto or it might give you many fold back",
"horscopeCategory3" => "your search in google php horsecope and nothing came up was last week so relax dude!",
"horscopeCategory4" => "are u sure? she knows you are secretly using messengers. reduce!",
"horscopeCategory5" => "your friend seems to be offtrack. u can tell his wife about it..lol"
)
$weekStart="Monday"
How can the program:
(a) RANDOMLY pick a horsecope
(b) Display it same all days of the week
(c) Come next week, pick a different one
(d) Program ensures RANDOM pick is unique/i.e. it's not included in other horsecopeCategories.
I have about 200KB array with valid horoscopes. Can you please help guys ? I did search here and many days in google and in vain. I am so sure this will come in handy to so many of those like me. If you aren't into horsecope, your technique to let the program CHANGE a given text on a weekly basis would be awesome.
(a) Can we store the data on a cookie and come next monday we change it ? But the program would be stupid at least if the user has disabled cookies. I guess I could use a flatfile to store and check if the displayed horsecope is about to expire ???? Anyidea without using a flatfile etc ?