I'm rather new to PHP, and was trying to remove all lines where any instance of the string variable 'user' appears. My current code
if($action == "removeUser")
{
foreach(file('users.txt') as $line)
{
if (strpos($line, $parameters) !== false)
{
$line = "";
}
}
}
For some reason this doesn't seem to have any effect at all. What am I doing wrong?