note 51629 deleted from function.str-ireplace by aidan

From: Date: Sun, 24 Jul 2005 04:17:53 +0000
Subject: note 51629 deleted from function.str-ireplace by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92366@lists.php.net to get a copy of this message
Note Submitter: daevid at daevid dot com ---- modify my function to include these other preg_replaces... //highlight strings between quote marks $query = preg_replace("/['\"]([^'\"]*)['\"]/i", "'<FONT COLOR='#FF6600'>$1</FONT>'", $query, -1); //highlight numbers $query = preg_replace("/(\d+)/", "<FONT COLOR='#FF6600'>$1</FONT>", $query, -1); //highlight functions $query = preg_replace("/(\w+)\s?\(/", "<FONT COLOR='#CC00FF'>$1</FONT>(", $query, -1); //highlight tables/databases $query = preg_replace("/(\w+)\./", "<U>$1</U>.", $query, -1);

« previous php.notes (#92366) next »