Jump to content

ksimpkins

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ksimpkins's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry everyone.. This is what I am trying to do.. but I would like to only write a certain number from the array.. for example.. if I had 20 items in the array, but I would want it to randomly pick 5 of the them and display them. Any thoughts? <?php $ads = array ( 'ad-stt-weddings-elisha-orin-photography', 'ad-stt-weddings-brandi-mays-videographer', 'ad-stt-weddings-sugar-and-spice-artistry', 'ad-stt-weddings-weddings-the-island-way'); shuffle($ads); foreach ( $ads as $ad ) { WriteContent($ad); }
  2. I am new to PHP and I was trying to create an array and have it shuffle some write content. The website address is http://www.travelvi.com/template/us-vir ... dings.html -- I am trying shuffle ads randomly please help me with this.. <?php $ads = array (WriteContent('ad-stt-weddings-elisha-orin-photography'), WriteContent('ad-stt-weddings-brandi-mays-videographer')); shuffle($ads); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.