I know this is simple for some of you, but (as usual) is hurting my tiny brain.
I have html stored in the db as html special characters. Most of it should be displayed unaltered, but actual html tags need to be un-converted so both the angle brackets (</>) and doublequotes (") are themselves, instead of html special characters.
I've got the angle brackets working fine:
preg_replace('/<(\/?.+?)>/s','<$1>', $string);
but what I want do is also convert every "[ampersand]quot;" between the angle brackets into " (double quote).
(sorry, have to write it that way or the board converts it to a doublequote)
So either I need to convert one first, then the other - e.g. 'make every [ampersand]quot; between < and > into "' (or, 'make every [ampersand]quot; between < and > into "') - or I need to modify the above preg_replace to have it replace the [ampersand]quot; at the same time.
I can't seem to wrap my brain around how to replace all instances of something that happen between two other somethings. Any advice?
Thanks,
Bob