Results 1 to 2 of 2

Thread: Php array_rand

  1. #1
    Join Date
    Oct 2011
    Posts
    11

    Default Php array_rand

    Php array_rand
    <?php
    $input
    = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
    $rand_keys = array_rand($input, 2);
    echo
    $input[$rand_keys[0]] . "\n";
    echo
    $input[$rand_keys[1]] . "\n";
    ?>

  2. #2
    Join Date
    Nov 2011
    Posts
    4

    Default

    but could you please tell me what will be the out put of this program? i can't realize this correctly. could you please explain it in your own and simple words. just for me. really appreciate to you. thanks man.:p

    koozies
    Last edited by harey; 11-05-2011 at 12:53 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •