PHP question

Miscellaneous Forums/General Discussion/PHP question

On my new project www.dampes8n.com/timebridge/ I have a comment system that saves comments to a .txt then reads it.

Whenever someone enters a ' it adds \ before it.

So far it only happens to the ' and so I am just fine with that.

My question is, how and where should I alter the strings to remove the \

That is really my only question... If no one helps me out with this I'll be forced to read a book.. and no one wants me to have to do that. So lets try to be helpful here.

Look at GNet.

Php.net is a really helpful place for PHP.

The \ is added automatically so that PHP knows that the ' is not the end of a string, but actually a ' symbol. (The same thing must be done in many other programming languages, including BlitzMax)

Right... i know WHY the \ is inserted... what I wanted to know was the best way to remove it before it is printed to the screen... and when... as in.. when to edit the string to remove the offending \s....

Doesn't php deal with removing the \ automatically when it echos the data?
You may want to look at reading the file into a variable and then echoing that. (Currently I am taking a wild and probably inaccurate guess that you are using Include).

Nope, I'm reading the .dat into a string then echo'n the string.... haha.. wish it did just get rid of it.. that would be nice....

Okay, I took a quick peek at PHP.net for you since I have it on my search bar, and here is what I found:

http://ca.php.net/manual/en/function.stripslashes.php

Other strings info:
http://ca.php.net/strings
http://ca.php.net/types.string

SWEET ok that worked wonders... Thanks a ton Pickles. You da Man