[thelist] [php] ereg_replace
MarsHall
evolt at MARSorange.com
Mon Nov 18 21:15:01 CST 2002
On Monday, Nov 18, 2002, at 18:34 US/Central, Paul Bennett wrote:
> I have tested using ereg_replace("<", "<", $storedHtmlStringValue);
> to "unescape" the html in the database and output it as regular html,
> I figured that the above function would only replace the"<" character
> but it replaces both the "<" and the ">" character.Yes, I have rtfm
> and
> from what is stated, the function should only replace one character not
> 2. Any ideas???
The ereg_replace function only does what you tell it to. There is no
magic!
You must have something else in your code that is either:
- decoding the HTML entities
- not encoding them it in the first place
Without the source code, we cannot conjure an answer.
Mars :)
More information about the thelist
mailing list