i dont like being held by the hand through this type of thing but i really cant remember how i did it before.
Following my previous post i now have this
$numbers = range(1,20);
shuffle($numbers);
$randno = array_slice($numbers, 0, 5);
to get my 5 random numbers.
i need these numbers appended to the end of a variable. eg.
$randno['3'] == 4 so i want $yemen4,
$randno['0'] == 11 so i want $yemen11
at the end i should have 5 random $yemens
$yemen1 = 'blah blah blah';
$yemen2 = 'blah blah';
$yemen3 = 'blah';
etc
now i would like all of the random yemens echo'd so i guess they should be in an array.
I have been racking my brains and i cant work out how to do this. please someone help
i could use
foreach($randno as $val)
{
if ($val == 1)
{
echo 'blah blah';
}
if($val == 2)
{
echo 'blah';
}
echo '<br />';
}
but im sure there is a more efficient way. Sorry for imposing babysitting duties upon thee