Unless I'm missing something, why put it in an array. Why not just just select the data from the data base that matches your search_name and list it. Something like:
SELECT e_mail, name FROM e_mail_file WHERE name = '$search_name' ORDER by name HTH. Dan. [EMAIL PROTECTED] wrote: > After I read this file into an array (small sample of file below) I need to sorted >it by the name at > the end of each line and then echo out only the ones that the name > equals the name in a search variable. > > Also could somebody recommend a PHP book that covers a lot of info on > working with text files. It seams to be very little info in any of the > boos I have now. It is sort of skipped over a lot > > [EMAIL PROTECTED] mrgouldian > [EMAIL PROTECTED] myname > [EMAIL PROTECTED] mrgouldian > [EMAIL PROTECTED] mrgouldian > [EMAIL PROTECTED] myname > [EMAIL PROTECTED] mrgouldian > [EMAIL PROTECTED] myname > [EMAIL PROTECTED] myname > [EMAIL PROTECTED] mrgouldian > [EMAIL PROTECTED] myname > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php