# Random XML values in PHP

**URL:** <https://forum.kirupa.com/t/random-xml-values-in-php/187960>\
**Category:** programming\
**Created:** [May 3, 2006, 12:22pm UTC](https://forum.kirupa.com/t/random-xml-values-in-php/187960 "2006-05-03T12:22:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marz\_dh](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@marz\_dh](https://forum.kirupa.com/u/marz_dh)\
**Post date:** [May 3, 2006, 12:22pm UTC](https://forum.kirupa.com/t/random-xml-values-in-php/187960/1 "2006-05-03T12:22:02Z")

</div>

I am basically a Flash programmer dabbling in PHP.

Now what I am tying to create is a PHP file that communicates between XML and Flash. My XML file has around 100 values and I want the PHP file to randomly pick any 10 and pass them on to Flash.

How do you go about picking any 10 values from the 100.

eg.  
\<file\>  
\<num\>1\</num\>  
\<num\>2…  
\</file\>

Now I want PHP to pick up any 10 \<num\> values from the 100 which are entered.
