• my blog has around 10 contributers, each of them has a user. i would like to show a random list of three users in the sidebar, and what i would REALLY like to do is also put their pictures and a few words about them (and of course a link to their page).

    does anyone know how can that be done? sadly, switching to MU is out of the question ??

Viewing 1 replies (of 1 total)
  • You can make an array with the users and then use random for the users…

    <?
    $user[0]= “You”;
    $user[1]= “Another Guy”;
    $user[2]= “Another one”;
    $user[3]= “One more”;
    $user[4]= “The last one”;

    $email[0]= “[email protected]”;
    $email[1]= “[email protected]”;
    $email[2]= “[email protected]”;
    $email[3]= “[email protected]”;
    $email[4]= “[email protected]”;

    $get = count($user)-1;
    $random = rand(0,$get);
    echo “User:”. $user[$random];
    echo “<br>Email:”. $email[$random];
    ?>

    That will show you one. If you repeat the last four lines again, you will have three (if you dont wanna to repeat, you can combine “if” statement…)

    Sorry for my english..

Viewing 1 replies (of 1 total)
  • The topic ‘listing 3 random blog authors’ is closed to new replies.