hello boys and girls !
here is my problem :
i try to delete an element from an array created from a string, with explode(). i use
unset(), but it's not working. any ideea why ?! here is the code:
$todelete = '12a'; // just fot testing, this variable is naturally from $_POST
$array = explode("\n",$read_file); // $read_file is a string from a text file
unset($array[$todelete]);
//print_r($array);
$filecontent = implode("\n",$array); //in the end, the new array will be turned into a string, and writed to the text file... wonderfull thinking , ah ?! :)))
i don't know for shure if unset($array[$todelete]); it's the correct way to write it, but i
can't write it like unset($array['something']); , because the process must be automated...