note 51329 deleted from function.preg-replace by tularis

From: Date: Sun, 18 Jun 2006 13:25:22 +0000
Subject: note 51329 deleted from function.preg-replace by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114309@lists.php.net to get a copy of this message
Note Submitter: support at duggen dot net ---- Here is a way to replace usual characters from MS Word to xhtml conform codes. I used it to make form-texts that are pasted from a Word document xhtml valid. Bullet <?php $contentText = preg_replace("/\x95/","&#8226;",$contentText); ?> Long dashes <?php $contentText = preg_replace("/\x96/","-",$contentText); $contentText = preg_replace("/\x97/","-",$contentText); ?>

« previous php.notes (#114309) next »