PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i want to read a file (with the file() function) and then search for an array element and delete this element from the array ... but i'm using a variable for the word that the elemnt has to be.... (the variable is $dat)
<? if($dat){
if(@unlink("upload/".$dat)){
$zahl = file("count.txt");
$zohl = $zahlї0]-1;
$z = fopen("count.txt","w");
fwrite($z,$zohl);
fclose($z);
$zahl2 = file("avas.txt");
# above does my probleme take place :-/ #
echo "The file $dat has been deleted!";
}else{
echo "Error: File has not been deleted!";
}