Php Code to put same random number to other part
<p>i want to create a php random number between 1 to 1000000  and what that same random number at 4 different part of site. i tried but i am getting random number at all different place. but i want the same number at all place. if any one can help me please?</p>

<p>I am using this</p>

<pre><code>&lt;?php
function url() {
  $rand = rand(1, 1000000);
  return $rand;
}
?&gt;
</code></pre>

<p>and when I echo using this so numbers are random at all place</p>

<pre><code>&lt;?php echo url(); ?&gt;
</code></pre>
