how can we add the slashes

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
prakum
Forum Newbie
Posts: 1
Joined: Sat Oct 27, 2007 4:08 am

how can we add the slashes

Post by prakum »

hi friends,
i am using one tooltip. it is not allowing the the '(single quot) and "(double quot).
befoe that i should add the \'(for sing quot) and &quot(for double quot). how can i add. give some idea.
please help to me.

thanks,
prakum.
User avatar
N1gel
Forum Commoner
Posts: 95
Joined: Sun Apr 30, 2006 12:01 pm

php manual

Post by N1gel »

There are several things in the php manual that might help

addslashes

or

mysql_escape_string

or if you wanted to code it yourself you could use

str_replace
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You probably don't need slashes, but htmlspecialchars().
Post Reply