I\'ve got a large flat file of usernames and emails in the following format:
\"username\", \"email\" \"username\", \"email\" \"username\", \"email\" <
\"username\", \"email\" \"username\", \"email\" \"username\", \"email\"
As per reko_t's suggestion: Use fgetcsv to read individual lines of csv into arrays, until you find one where the second element matches your search term. The first element then is the username. Something like: