title: How to do random with priority?
body: <p>This is my code, for example:</p>
  
  <pre><code>&lt;?php
       $arr = array(
            array("url" =&gt; "http://google.com", "priority" =&gt; 2),
            array("url" =&gt; "http://facebook.com", "priority" =&gt; 2),
            array("url" =&gt; "http://youtube.com", "priority" =&gt; 2),
            array("url" =&gt; "http://stackoverflow.com", "priority" =&gt; 1),
            array("url" =&gt; "http://kickass.to", "priority" =&gt; 1),
            array("url" =&gt; "http://twitter.com", "priority" =&gt; 1),
            array("url" =&gt; "http://example.com", "priority" =&gt; 1),
       );
  ?&gt;
  </code></pre>
  
  <p>I want the system to randomly display one of the url's on each refresh. I want it to display the higher priority more times than the lower. I need it for banner system, and the ones with higher priority paying more, so they should be seen more.</p>
  
  <p>How to do it?</p>