okay, took a bit to find it, but i got it, here ya go bro
imagine $x is the search field for the username
<?php
// turn the file into an array
$file = file("location_of_file");
// see if the string exists in the file
if (in_array($x, $file)) {
// search the file for the string, then output the index it was found in
$i = array_search($x, $file);
// split the index into another array
$array = explode("|", $file[$i]);
} else {
// if nothing found, tell the user
print "$x not found.";
}
?>
Then, if $x was Username $array[0] would output Username, and $array[1] would output Password and so on.