Text file :
// text.txt
fred|is the man|yes
john|has a bird|no
sally|has a cat|yes
// open into an array
$contents = file('text.txt');
// Now, the following applies :
$contents[0] = 'fred|is the man|yes';
$contents[1] = 'john|has a bird|no';
$contents[2] = 'sally|has a cat|yes';
// Let's explode it
$foo = explode('|',$contents[0]);
// Now, the following applies :
$foo[0] = 'fred';
$foo[1] = 'is the man';
$foo[2] = 'yes';