Jump to content

str_replace not working?


MrAdam

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...