how to grab a "random" set of items from a loop in php
<p>Im looping through some XML nodes, and say i have between 1 and 200 of these nodes.</p>

<p>How can i "randomly" select a maximum of 10 of these nodes. It has to be as most ten, but as few as 1.</p>

<p>This is what im working with now...</p>

<pre><code>        $i = 0;
        foreach ($butters-&gt;users-&gt;user as $user) {
            if($i==10) break;
            $id = $user-&gt;id;
            $name = $user-&gt;screen_name;
            $profimg = $user-&gt;profile_image_url;
            echo "things";
            $i++;
        } 
</code></pre>

<p>The difficulty is that i don't know how many i will have, but would like the pool from which i select my "random" 10 to be from the entirety of however many are present.</p>
