Removing "\"s from a string.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
braveryonions
Forum Newbie
Posts: 14
Joined: Wed Feb 11, 2009 3:31 pm

Removing "\"s from a string.

Post by braveryonions »

I have built a program to store/manage a list of characters in a book (for school). The user enters information about a character, and the information is displayed on the page in a text box. This is so that the data can be altered easily. Whenever the user presses "Apply Changes", any alterations that have been made are saved for next time.

My problem is that if someone uses an apostrophe, it displays a "\" before it. Each time they press "Apply Changes" the number of "\"s grows exponentially. This is very annoying. Is there a function that keeps this from happening? If not, how can I fix this?
mmoussa
Forum Newbie
Posts: 8
Joined: Wed Mar 18, 2009 8:43 am

Re: Removing "\"s from a string.

Post by mmoussa »

braveryonions
Forum Newbie
Posts: 14
Joined: Wed Feb 11, 2009 3:31 pm

Re: Removing "\"s from a string.

Post by braveryonions »

Thanks!
Post Reply