I'm trying to get something right when I reload the browser the array changes randomly with no duplicate. When I reload the browser I saw duplicate array coming randomly, please help me.
Here is the code
<html>
<head></head>
<body>
<?php
$size = 3; $strl = "what"; $fitness1 = array("steps $strl", "dizziness $strl", "$strl symptoms ", "treatment $strl", "obesity $strl","$strl discharge");
$fitness1 = array_unique($fitness1);
$number = 1;
for ($b = 0; $b < $size ;$b++){
echo $number++ . "<table><tr><td> " . $fitness1[array_rand($fitness1)] . "<td></tr></table>";echo $number++ . "<table><tr><td> " . $fitness1[array_rand($fitness1)] . "<td></tr></table>";
for ($i = 0; $i < $size; $i++){
}
}
?>
</body>
</html>
shuffle()