Original code: <phrase name="ascending" date="1287942994" username="Správce" version="4.0.8"><![CDATA[[B]Vzestupně[/B]]]></phrase> <phrase name="descending" date="1287942982" username="Správce" version="4.0.8"><![CDATA[[B]Sestupně[/B]]]></phrase> <phrase name="reminder" date="1287942945" username="Správce" version="4.0.8"><![CDATA[[B]Jméno[/B]]]></phrase> Code (markup): I want to get this: Vzestupně Sestupně Jméno Code (markup): Do you know how to achieve this? Thanks.
Hi, No problem use this little bit of script: <?php $Din = file('./textfile.txt'); // get textfile contents $Dout = fopen("./textout.txt", "w"); // set output file $lines = array_unique($Din); // split into individual lines $STARTtag = "<![CDATA["; $ENDtag = "]]>"; foreach($lines as $line) { $line = substr($line, (strpos($line, $STARTtag) + strlen($STARTtag)) ); // strip to and including start tag $line = substr($line, 0, strpos($line, $ENDtag)); // strip from and including end tag echo($line."<br>"); // for browser output if required $line.= "\r\n"; // add line termination for output file fputs($Dout, $line); // write to file } fclose($Dout); // close output file ?> Code (markup): my textfile.txt had the following content <phrase name="ascending" date="1287942994" username="Správce" version="4.0.8"><![CDATA[Vzestupne]]></phrase> <phrase name="descending" date="1287942982" username="Správce" version="4.0.8"><![CDATA[Sestupne]]></phrase> <phrase name="reminder" date="1287942945" username="Správce" version="4.0.8"><![CDATA[Jméno]]></phrase> Code (markup): (I lost some characters when copying via notepad, not due to the script) which gives the output text file contents of: Vzestupne Sestupne Jméno Hope that helps? Si