Osmosis is a project mainly written in PHP, it's free.
A very simple text -> html conversion library