Re: Change color of anything in double/single quotes

From: Date: Sat, 25 Apr 2009 17:50:05 +0000
Subject: Re: Change color of anything in double/single quotes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-291974@lists.php.net to get a copy of this message
Andrew Hucks wrote:
If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like <font color=color>"hello"</font> there.
Try $string = preg_replace('/"(.*?)"/', '<font color=color>"\\1"</font>', $string); Greetings from Germany Marc Steinert -- Synchronize and share your files over the web for free http://bithub.net/ My Twitter feed http://twitter.com/MarcSteinert

« previous php.general (#291974) next »