Andres Santos wrote: > im developing a membership system, which emails new users some info. > THAT info has HTML on it (im using phpMailer to handle the email > sending). > > My problem is at the plain() function. I need to accomplish this: > * Replace the BR tag with newlines (\n) so that all new lines show in > text-only email clients as well. > > Further considerations: > * The BR tag can be <br>, <br />, <br/>, etc.. so ill need a proper > preg_replace there This should do it: return preg_replace('/<br\s*\/?\s*>/Ui', '', $data); -- Rajesh ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/