NYCPHP Meetup

NYPHP.org

[nycphp-talk] random image selection

CED Consult at CovenantEDesign.com
Mon May 28 17:18:59 EDT 2007


OR

foreach(glob("imageDirectory/*.gif") as $item){
 $sort[] = end(explode('/',$item));
 
 }
$i = rand(0, count($sort);
echo $sort[$i];

HTH,
Ed
Edward JS Prevost II
Me at EdwardPrevost.info
www.EdwardPrevost.info
  ----- Original Message ----- 
  From: selyah 
  To: NYPHP Talk 
  Sent: Monday, May 28, 2007 4:56 PM
  Subject: [nycphp-talk] random image selection




  is there a simple way of selecting random images to be displayed from a library of images.
  Thanks



------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/a229c148/attachment.html>


More information about the talk mailing list