THIS IS A PHP ISSUE Every time i type a " or a ' on my website it shows as \" and \' How do i sort this Someone said use the striptag() but how woul i use that with ".replace()." Thanks
Please don't create multiple threads for the same problem. Why not post in the old thread? http://forums.digitalpoint.com/showthread.php?t=531929 Plus, your question does not make much sense to me. There is no "replace()" function in PHP, it's called "str_replace()", but even if, your question still doesn't make sense. stripslashes() replaces the slashes with nothing, so what do you want "replace()" for? Post your code if necessary...
firstly i searched for my other post and it wasnt found secondly the replace tag is as follows echo replace() and it is used to add replace files such as smileys and swear words etc
Fatal error: Call to undefined function: stripslash() in /home/content/a/m/a/amafiali/html/right.php on line 346 See doesnt work! I need replace function too echo"".replace($topictext).""; PHP: As it connects to a page that replaces words for other words, such as if somebody types it makes text bold because they cannot use <B> You understand?
are you a professional at not reading? it's STRIPSLASHES WITH AN ES! we even gave you examples and if you want to use replace so bad, why not? replace is not a built in function, so obviously you must have created it yourself, so why can't you use it?
You have spelt the function name incorrectly - it is spelt stripslashes() The is no function built into php called replace(). Use the function stripslashes() as we have already recommended. Brew
lol you sound very arrogant bro...take it easy i dont understand how you are asking for help and yet you seem to think you know better... stripslashes() is a defined functions and it works....i've used it countless times...
Again, replace() is not a built-in PHP function. It might be a function defined by the software you're using. (I tried reading your mind but for some odd reason it did not work) If you need help with YOUR replace() function, then you need to post it. (Since the mind reading failed. I'm sorry, I tried real hard, I promise!)
i changed the replace code to stripslashes and wat do u no, the BB code stopped working. I can ensure you that i use the replace() on every server i been on and it never fails to work!
If you are calling a function called replace() and it is not working, it is because you are missing the function in one of your files - this will either be because the file is not being included or the function does not exist in any of your files. Without any further information from you we cannot help any more than we already have. Brew
Just disable "Magic Quotes" using .htaccess file if you are using Apache. # Turn off magic_quotes <IfModule mod_php5.c> php_flag magic_quotes_gpc off php_flag magic_quotes_runtime off </IfModule> <IfModule mod_php4.c> php_flag magic_quotes_gpc off php_flag magic_quotes_runtime off </IfModule> Code (markup): It will prevent PHP from adding slashes to input data. You can also disable them in php.ini.
http://www.php.net/manual-lookup.php?pattern=replace Post your code, Post your code, post your code. .
Sounds like your using a prepacked software. Possibly a bulletin board or CMS. Anyways, replace is not a php function, it is a function within the script you are using. It works on every server you've been on, if you've been working with this same script on all those servers. To get rid of slashes, do what decepti0n said, and use this: echo"".replace(stripslashes($topictext)).""; PHP:
You are probably thinking about the javascript function replace(): http://www.w3schools.com/jsref/jsref_replace.asp