HELP NEEDED - Display text in random order
Posted: Sat Jul 30, 2005 10:49 am
I was hoping some one on this forum would be able to help me with my problem. I am relatively new to PHP and therefore do not know a great deal.
What I am trying to achieve is get PHP to display an XML file. I have managed to get that working. However, I would like to have the text displayed in random order.
Example:
<answer><?php echo $name_row[1]</answer>
<answer><?php echo $name_row[2]</answer>
<answer><?php echo $name_row[3]</answer>
The code processed would display
<answer>Windows</answer>
<answer>Linux</answer>
<answer>Unix</answer>
But I would like it to display in a random order each time the php page is processed, rather than in the same order ie. Linux, Unix, Windows or Windows, Unix, Linux etc.
Any help from members on this forum would be greatly appreciated.
Cheers
What I am trying to achieve is get PHP to display an XML file. I have managed to get that working. However, I would like to have the text displayed in random order.
Example:
<answer><?php echo $name_row[1]</answer>
<answer><?php echo $name_row[2]</answer>
<answer><?php echo $name_row[3]</answer>
The code processed would display
<answer>Windows</answer>
<answer>Linux</answer>
<answer>Unix</answer>
But I would like it to display in a random order each time the php page is processed, rather than in the same order ie. Linux, Unix, Windows or Windows, Unix, Linux etc.
Any help from members on this forum would be greatly appreciated.
Cheers