Hi

Why this code will make empty line between each text line???

$linkFile='link.txt';
$links=file($linkFile);
$fs=fopen($linkFile,'w+');
for ($i=0; $i<count($links); $i++){
        if (count(explode(',',$links[$i]))==4){
                $fout=fwrite($fs,$links[$i]);
        }
}
fclose($fs);

Same file before:
-------------------------------------------------------
http://www.mp3.com,MP3 Site,Official mp3 site,0
http://www.winamp.com,Winamp,Winamp - MP3 Player,0
-------------------------------------------------------

,and after running this script several times:
-------------------------------------------------------
http://www.mp3.com,MP3 Site,Official mp3 site,0




http://www.winamp.com,Winamp,Winamp - MP3 Player,0




-------------------------------------------------------

I dont want those emty lines!!!!!

Help please!!!!


-----------------------------------------
Meeldetuletused kalendrist sms-lühisõnumina. Uuri järgi!
http://www.hot.ee

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to