Not sure that "I'm the man" on this or many other issues, but here's a couple of things.
Array keys start at zero by default, so assuming the first entry in an array is to be "user" call it with the key [0]
Second, your assignment statement there looks backwards, although it's probably just that you put it there for purposes of discussion rather than coding.
It might be possible to use "file," then explode twice, assuming something like this.
Contents of flatfile:
id1, username1, password1
id2, username2, password2
id3, etc......
Then you could:
$file_content=fread("flatfile", filesize("flatfile"));
$lines = explode ( "\n", $file_contents );
foreach ( $lines as $line ) {
list( $id, $username, $password ) = explode( ',', $line );
.....and then do your conditional checking within this loop with each potential user in turn. Could be a tad expensive, I guess, if the list of potential users is real long.
HTH,