Welcome

Welcome to the Forums, Blogs, Wikis discussion boards. If you're new here please take a moment to register for an account. If you're already a member here, welcome back. Please login to join in.

Forums, Blogs, Wikis » Coding

How-To - Random list of numbers in PHP

  • Started 1 year ago by ryan
  1. Need to create a list of numbers in random order? Here's a quick and easy way.

    <?php
    $arrRandom = range(1,7);
    shuffle($arrRandom);
    ?>

    First link creates an array with numbers 1 through 7. Second line shuffles the array. Piece of cake, huh?

    Ryan
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.