niche Posted May 21, 2012 Share Posted May 21, 2012 (edited) How do you display html as code in a browser? Edited May 21, 2012 by niche Link to comment Share on other sites More sharing options...
Ingolme Posted May 21, 2012 Share Posted May 21, 2012 Change all the "<" characters for "<" Link to comment Share on other sites More sharing options...
niche Posted May 21, 2012 Author Share Posted May 21, 2012 Thanks Ingolme. What do you think about htmlentities()? Link to comment Share on other sites More sharing options...
Ingolme Posted May 21, 2012 Share Posted May 21, 2012 That works, though I prefer html_special_chars() because it only converts parseable characters and not everything. (Meaning it's valid for XML as well. 1 Link to comment Share on other sites More sharing options...
niche Posted May 21, 2012 Author Share Posted May 21, 2012 I knew you'd have the back story! Thanks again Ingolme. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now