i need to find a line and change it to whatever user will type in input i didnt write this code pls help
<?php
$myfile = 'test.txt';
$lines = file($myFile, FILE_IGNORE_NEW_LINES);
$lines[4] = $_POST['title'];
file_put_contents($myFile , implode("\n", $lines));
?>
i tryed lot of ways but non of them works and i only have this code . i am working on project idea is simple user will give type url of website i need to find a line and change it to <form action="process.php" method="post">
i need help its will be on same line so i dont need to change line
i searched lot of ways but does not works for me.
i am starter at php so...