therunningman
therunningman

Reputation: 3

How would I use php to generate random XML files?

I am trying to write a php that would generate random XML Files that I've previously written. As this php code generate random numbers between 10-30:

<?php
print rand() . "<br>";
//line 4 calls out a number between 10 and 30 inclusive
print rand(10,30);
?>

How would I be able to generate random XML Files?

I am a newbie at this, so apologies if this is a dumb question!

Any help will be seriously appreciated!

Sam

Upvotes: 0

Views: 167

Answers (1)

Oussama Jilal
Oussama Jilal

Reputation: 7739

you can store the xml files names in an array then use array_rand() to pick one randomly

Upvotes: 2

Related Questions