Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/03/2012, 22:06
Avatar de mazaku
mazaku
 
Fecha de Ingreso: septiembre-2009
Ubicación: Veracruz
Mensajes: 104
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: problema al ordenar array

Muchas gracias por tu pronta ayuda, vi el manual que me indicaste y disculpa mi ignorancia pero podrias porfavor indicarme en que parte debo incluir el sort

lo maneje asi pero me marca error

Código PHP:
Ver original
  1. <? if (is_dir($dir)){if ($dh = opendir($dir)){while (($file = readdir($dh)) !== false){if($file != '.' && $file != '..' && $file != 'Thumbs.db'){if($i==0){$firstpic=$file;}$i++;$filenames.="'".$file."', ";}}echo substr($filenames, 0, -2);sort($filenames);closedir($dh);}}?>

Cita:
b>Warning</b>: sort() expects parameter 1 to be array, string given in <b>/home/manganix/public_html/manganix.uni.me/galeria.php</b> on line <b>20</b><br />