You left out http://php.net/sort if you want if alphabetical, but other than
that, it looks like you're done...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Jordan Elver <[EMAIL PROTECTED]>
Newsgroups: php.general
To: PHP General Mailing List <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 3:32 PM
Subject: Merging Arrays


> Hi,
> I've got to different files of words. One on each line.
> What would be the best way to combine both into one file alphabetically?
> I thought about:
>
> $file1 = file('file1.txt');
> $file2 = file('file2.txt');
> $both = array_merge($file1, $file2);
>
> print_r($both);
>
> Any advice?
>
> Cheers,
>
> Jord
> --
> Jordan Elver
> Web Developer
> The InternetOne UK Ltd


-- 
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]

Reply via email to