.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 "\t" 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?
You can use str_replace() to convert "\r" and "t" into <br/>.
$str = "Some tet.\r Other text.\t And so on ...";
$str2 = str_replace(array("\r", "\t"), '<br/>', $str);