I am looking for the correct way to open a text file and load the content to a
array
Delete the first line and save the content again in the same text file.
without the removed line I use this example:
<?php
$ra= file("datos.txt");
$s = unset($ra[0]);
$file = fopen("datos.txt", "w");
fwrite($file,$s);
fclose($file);
?>
The problem is that the result is a text file with no content.
I look forward to any ideas.
Here is an example: I hope it helps you. Cheers