title: fixing a randomly generated number in a session
body: <p>Sorry to bother people with this. I have searched for an answer everywhere without success, although I accept that I am a complete newbie. Is there anyway in PHP to generate a random number 1-100 that you can then 'fix' i.e. keep it constant so it can be used in different ways in a session. I have a hundred photos in an application which I wish to display by selecting one at random and then displaying the next 20. As I loop through the code, the mt_rand function regenerates another number and another and so on and every now and then it means that photos shown are duplicated....i.e. it has no knowledge of the random numbers it has previously shown in that session. Can't seem to fix it in the $_SESSION superglobal. Again apologies....don't know if you offer help on these kinds of matters.</p>