title: Random number within range with a seed
body: <p>I've been trying to wrap my head around solving this issue but I can't seem to find a simple solution to it.</p>
  
  <p>I have a dynamic grid layout, articles are placed on the grid but have different width &amp; height. This width &amp; height of these different articles can change upon visiting the site but only when there is a new article added.</p>
  
  <p>The issue is I have logic that uses <code>mt_rand</code> to generate random numbers within a range (to fit in the layout grid), is there a way I can pass in a seed (planning to use the newest article id) so that the random numbers are consistent until a new article is introduced? I wanted to use <code>mt_srand</code> but there doesn't seem to be an easy way to limit the random number within a range.</p>
  
  <p>Thanks.</p>