.odt to .xhtml

Seems to me a sitepoint author (Kevin Yank?) wrote a function that would generate html from a text file looking for “\r” or "\ " or both – converting them into “<p>” or “<br>” [obviously before xhtml].

I can’t find that function. And, in any case, would like to extend it to handle italics and bold using an OpenOffice text file (.odt) source.

I know there are “free” converters out on 'net – but they require email address and cookies permissions – I’d just as soon not (PRISM not withstanding).

Anyone got such an animal?

Regards,

grNadpa

Hi
You can use str_replace() to convert “\r” and “t” into <br/>.
Example:

$str = "Some tet.\\r Other text.\	 And so on ...";
$str2 = str_replace(array("\\r", "\	"), '<br/>', $str);
echo $str2;