title: How can I add a random number to each item in foreach loop but to stay the same for 1 day
body: <p>I'm trying to assign a different random number on each item in a foreach loop but I'd like the number to stay the same for one day. </p>
  
  <p>I've tried simply adding  <code>&lt;?php echo rand(0,20); ?&gt;</code> but this obviously just creates a random number per each refresh.</p>
  
  <p>Is there anyway I could keep the same random number per each item for one day without adding it to the database. </p>
  
  <p>for example:</p>
  
  <pre><code>item 1 = 2
  item 2 = 18
  item 3 = 13
  item 4 = 6
  </code></pre>
  
  <p>Stays the same for 1 day then changes</p>