Robin, Dan, Rabin,
Thank you all for your advice. You've helped me understand regular
expressions a little better, and cleared some some confusion about arrays.
I'll be adapting all the code you provided for me needs.
Thank you for taking the time to help.
--
Dave M G
--
PHP General
PHP List,
In the code below, I want to take the text within $content, and change
every instance of [h3] into h3, and every instance of [/h3] into
/h3. And then do the same for [em], [/em], [strong], and so on.
However, this code does absolutely nothing to the text stored in content:
$tags =
On 5/26/06, Dave M G [EMAIL PROTECTED] wrote:
PHP List,
In the code below, I want to take the text within $content, and change
every instance of [h3] into h3, and every instance of [/h3] into
/h3. And then do the same for [em], [/em], [strong], and so on.
However, this code does absolutely
out :)
HTH
Dan
--
Dan Parry
Senior Developer
Virtua Webtech Ltd
http://www.virtuawebtech.co.uk
-Original Message-
From: Dave M G [mailto:[EMAIL PROTECTED]
Sent: 26 May 2006 10:26
To: php-general@lists.php.net
Subject: [PHP] Why does this preg_replace function not work?
PHP List
On 26/05/06, Dave M G [EMAIL PROTECTED] wrote:
I also tried str_replace(), but predictably that did not help. As far as
I understand it, it does not accept arrays.
It does, and you can do it with str_replace.
What am I doing wrong in the above code?
And can the two preg_replace() commands
5 matches
Mail list logo