note 38542 deleted from function.highlight-string by aidan

From: Date: Sun, 26 Sep 2004 13:46:54 +0000
Subject: note 38542 deleted from function.highlight-string by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77366@lists.php.net to get a copy of this message
Note Submitter: http://iubito.free.fr ---- Hi ! if you want that all PHP functions are transformed into links to php doc... add this code after an highlight :-) <?php $str = preg_replace( '{([\w_]+)(\s*</font>)(\s*<font\s+color="' .ini_get('highlight.keyword').'">\s*\()}m', '<a class="phpfunction" target="_blank" title="doc PHP $1"' .' href="http://www.php.net/$1">$1</a>$2$3', highlight_string($YOUR_STRING, true)); ?> It looks for all colored word followed by a '(' parenthesis. Enjoy !

« previous php.notes (#77366) next »