MrAdam Posted September 20, 2006 Share Posted September 20, 2006 hey guys.well here's the problem.. i've made a script, which at one point prints out some HTML that has been saved in a variable, but the problem is i want it to print as just text - not actual HTML. i've tried using an str_replace() function to change the "<" to "<" and ">" to ">" .. but it didn't work, there was no change at all: <?php$code = ".......";str_replace("<", "<", $code);str_replace(">", ">", $code);print $code;?> could anybody tell me why?-hope i explained this well enough. thanks. Link to comment Share on other sites More sharing options...
reportingsjr Posted September 20, 2006 Share Posted September 20, 2006 lol, you forgot to say what variable str_replace was going to make. <?php$code = ".......";$code = str_replace("<", "<", $code);$code = str_replace(">", ">", $code);print $code;?> Link to comment Share on other sites More sharing options...
MrAdam Posted September 20, 2006 Author Share Posted September 20, 2006 haha. silly me. thanks! 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