Jump to content

[SOLVED] help with addcslashes()


devdavad

Recommended Posts

I want to make a charlist that will add a \ to these characters: "&<>[]/\'"#$@" to be used in the addcslashes() function but I'm not exactly for sure how to format it. If you are not for sure how one would go about making this kind of charlist do you know where I could find more information on it?

 

For example on the php.net page http://us2.php.net/manual/en/function.addcslashes.php it gives an example that addcslashes("aBc[]", "A..z") will return \a\B\c\[\] but I'm not exactly for sure why the range of A..z would include the [] symbols.

Link to comment
https://forums.phpfreaks.com/topic/138144-solved-help-with-addcslashes/
Share on other sites

it works out the range based on the ascii table

so uppercase A through lowercase z includes some strange characters in the middle.

 

Scott.

 

Great thank you very much! Do you know how I could skip characters in a certain range (or how to select individual characters)?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.