When you do $list = sort($list) you are assigning a boolean true/false to
the success/failure of the sort to $list (on the left hand side of the
equals sign). What I think you really want is:
$list = file('list_main.txt');
sort($list);
Regards,
--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts
"Jeff Oien" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This didn't get answered before. I'm trying to sort an array but it
> won't work.
> $list = file('list_main.txt');
> $list = sort($list);
> If I print $list it gives me 1 and print $list[0] is nothing. The
list_main.txt
> looks something like this:
> ABC
> DEFG
> HIJ
> etc.
>
> Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]