note 63840 added to function.highlight-string

From: Date: Sat, 01 Apr 2006 15:36:19 +0000
Subject: note 63840 added to function.highlight-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-107130@lists.php.net to get a copy of this message
Looks complex. To get strict xhtml 1.0, I simply run the highlighted string through str_replace, twice.. <?php $highlighted = str_replace('color="', 'style="color:', $highlighted); $highlighted = str_replace('font', 'span', $highlighted); ?> seems to work perfectly every time. also, it's very fast. Note, *reading* a source dump of a file containing any of the make-xhtml-valid functions on this page, won't make any sense at all! http://corz.org/source/corz%20function%20library/source-dump.php ;o) (or ---- Server IP: 85.116.0.130 Probable Submitter: 212.1.158.99 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.highlight-string.php Edit -- http://master.php.net/note/edit/63840 Del: integrated -- http://master.php.net/note/delete/63840/integrated Del: useless -- http://master.php.net/note/delete/63840/useless Del: bad code -- http://master.php.net/note/delete/63840/bad+code Del: spam -- http://master.php.net/note/delete/63840/spam Del: non-english -- http://master.php.net/note/delete/63840/non-english Del: in docs -- http://master.php.net/note/delete/63840/in+docs Del: other reasons-- http://master.php.net/note/delete/63840 Reject -- http://master.php.net/note/reject/63840 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107130) next »