Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Random order includes from directory

    Hi all,

    I'm new to these forums, and extremely new to php coding in general. My role is primarily a front-end developer (html / css) and a bit of php in the form of includes to manage recurring content and so forth.

    My question is probably convoluted so if my thinking is flawed, please let me know.

    I'm using a jquery content slider. It pulls from a <ul> and loads each <li> as an individual slide.

    What I would like to do is use php includes for each <li> (some inline css, and html) and have them load in a random order using a single script.

    Something like this...

    <!--content slider begins-->
    <ul>
    <?php include("RANDOM-LOADER-SCRIPT.php"); ?>
    </ul>
    <!--content slider ends-->


    Where RANDOM-LOADER-SCRIPT reads a directory of snippets (subfolder/snippet1.php, snippet2.php and so on) and includes ALL of them into the <ul> in a random order, without repeats.

    Thanks much!

  • #2
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    solved

    Thanks to Phoenix over on webforumz.com

    http://webforumz.com/php/3237-random...of-content.htm


  •  

    Tags for this Thread

    Posting Permissions

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