Since there are only values, you could use file().
Example:
<?php
// Read all lines from a file to array
$users = file('users.txt',FILE_IGNORE_NEW_LINES);
// Search for the array id of the line we want to be deleted
$idToDelete = array_search('MaryLu Female',$users);
// Check if we have a result
if($idToDelete !== false){
// If so, delete the array entry
unset($users[$idToDelete]);
}
// Finally, put the remaining entries back into the file,
// overwriting any existing content.
file_put_contents("users.txt",implode(PHP_EOL,$users));
But be aware it's not a good idea to store data in text files. One reason is as soon as two users are using your script (given it runs on a web server) the one who saves last wins.
Database Management Systems like MySQL, MariaDB or PostgreSQL or even SQLite (which is build into php afaik) are designed to circumvent stuff you are running into when storing data in a text file.
But since I don't know your use case this was just a word of warning, maybe your use case is perfectly fine for storing names in text files. :)