check 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
pedroz
Forum Commoner
Posts: 99
Joined: Thu Nov 03, 2005 6:21 am

check string

Post by pedroz »

Could you please tell me how can I check if a string has the following chars?

\ and " and '

I wrote some code but it is not working with \ and ' chars... :(
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: check string

Post by hawleyjr »

pedroz wrote:I wrote some code but it is not working with \ and ' chars... :(
Can we see it?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

That's because \ and ' and " usually have a special meaning in a string... Everything you need to know (and more) is available at: http://www.php.net/string.
Post Reply