im currently replacing the word with " " white space but id rather accually delete those characters? is there a function to do this? if not do i have to like put the rest of file in variable and rewind then fwrite it?
thanks.
Replace them with nothing, then.
how do i replace them with nothing? oh maybe fwrite has alength thing but its in bytes isnt it?
so i find out how long the string im replacing is in bytes then add that to the fwrite length parameter?
i cant find a function that gets the length of string in bytes??????
im pretty sure the number of characters and bytes arent the same?
What code are you using now?
Generally, if your text file only has ASCII characters, the number of characters should be the number of bytes.
yes. Im not sure thou im trying to make it with least exceptions so i just changed the structure of it a bit. its XML im editing
$text = str_replace($word, '', $text);