KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got a large flat file of usernames and emails in the following format: "username", "email" "username", "email" "username", "email" etc... I need to take the email and search for the username, but for some reason it will not return a result. It works if I search opposite. $string = "user_email@something.com"; $filename = "user_email.txt"; $h = fopen("$filename","r"); $flag=0; while (!feof ($h)) { $buffer = fgets($h); $thisarray = split(",", $buffer); if ($string == str_replace('"','', $thisarray[1])) { $i = 1; $i++; echo '<td bgcolor="#CCFFCC"><b style="color: maroon">' . str_replace('"','',$thisarray[0]). '</b></td>'; } Any ideas? Thanks!
Tags (comma-separated)
Save Edits
Cancel