Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/10/2011, 19:50
Avatar de Nemutagk
Nemutagk
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: México
Mensajes: 2.633
Antigüedad: 20 años, 1 mes
Puntos: 406
Respuesta: Mostrar imagenes ordenadas

te dare un ejemplo...
Código PHP:
Ver original
  1. $urlPath = 'files/img';
  2. $handle = opendir($urlPath);
  3.  
  4. $files = array();
  5.  
  6. while(false !== ($file = readdir($handle)) {
  7.       $files[] = $file;
  8. }
  9.  
  10. //ordenamos los archivos
  11. sort($files);
  12.  
  13. echo '<pre>';
  14. var_dump($files);
  15. echo '</pre>';
__________________
Listo?, tendría que tener 60 puntos menos de IQ para considerarme listo!!!
-- Sheldon Cooper
http://twitter.com/nemutagk
PD: No contestaré temas vía mensaje personal =)