I wrote some code that works fine and uses a for statement to iterate over the array and display the eight results like I want it to.
$Address = $RPC2->getaddressesbyaccount($_SESSION['email']);
$iteration_addresses = 0;
foreach($Address as $Another) {
$iteration_addresses++;
echo '<b>' . $Another . '</b><br /><br />';
if($iteration_addresses == 8) break;
}
But it usually chooses the same 8 results, how can I have it choose random results each AJAX call?
rand()php.net/manual/en/function.rand.php