Topic: (HTML?/CSS?/PHP?) Auto-transform characters to entities?

Alright, I'm making this website and I'd like to have chars like '<' and '>' to be automatically transformed to entities within certain tags (<pre> and such).

This possible with HTML/CSS/PHP?

Thanks.

(And yes there might be a simpler or a damn easy solution around somewhere, but I'm too dumb to realise it's there... tongue)

the musnet.com

By the way - how much is the fish?

2 (edited by Smartys 2006-07-30 16:15)

Re: (HTML?/CSS?/PHP?) Auto-transform characters to entities?

htmlspecialchars? Although I'm not sure exactly how you want to use this, htmlspecialchars will convert < and > properly (it's a PHP function btw)

Re: (HTML?/CSS?/PHP?) Auto-transform characters to entities?

Use htmlspecialchars() or htmlentities() wink

Re: (HTML?/CSS?/PHP?) Auto-transform characters to entities?

Alright, I'll try those. smile

Thanks.

the musnet.com

By the way - how much is the fish?