Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Load two authors without duplicating

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #41252
    chrisdasie
    Member

    Hi I’m trying to load two authors for my site at a time. I also need them to be random from my list of authors. However, I don’t have them sitting right next to each other. Here is what I have so far. You’ll notice I’m making the same request twice. I know there has to be a better way. Any help would be greatly appreciated.

    shuffle($uid);
    array_rand($uid);

    for($someNumber = 1; $someNumber <= 1; $someNumber++) {
    $userID = $uid[$someNumber];
    ?>

    |


    }
    unset($uid,$userID);
    ?>


    shuffle($uid);
    array_rand($uid);

    for($someNumber = 1; $someNumber <= 1; $someNumber++) {
    $userID = $uid[$someNumber];
    ?>


    |


    }
    unset($uid,$userID); ?>

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.