I've tried to use an array in a loop (in PHP) so that I can display 5 random values. But the problem is that the program doesn't work and nothing appears on the browser.
What's wrong with this code? Have I missed something?
<?php
$my_array = array('Mohammed', 'Khaled', 'Nasser', 'Yasser', 'Ahmed', 'Badr', 'Ibrahim', 'Ali', 'Turkey', 'Abdullah', 'Bandar', 'Omar', 'Saleh', 'Saeed', 'Salem');
$random_array = array_rand($my_array, 5);
for ($x==0 ; $x==4 ; $x++) {
echo $my_array[$random_array[$x]] . "</br>";
}
?>