> From: "Zoran Lorkovic" <[EMAIL PROTECTED]> > > > Well, when parsing html page data I want to save is saved in txt file. > > But when saving in txt file I got some strange chars like small square > > (this I see when open in NotePad). > [snip] > > Am I missing something? > > You forgot to post your code. If you're only using \n for newlines, Notepad > won't recognize them (it's expecting \r\n) and will mess up your layout.
Ok, here is one piece of code dealing with this: $data[0] = preg_replace("/([<])+([^>])+([.])*([>])+/i","", $data[0]); $data[0] = str_replace (" ", "", $data[0]); $file = fopen ("data.txt", "wb"); fwerite ($file, $data[0]); flocse ($file); As you see, I'm not using any \n for new lines because this code deals with HTML page. I guess problem is in new line, and trim() only cuts whitespaces. Regards. Zoran -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php