Support PHP4, PHP5
addcslashes - C-style slash string
string addcslashes (string $str, string $charlist)
Returns a string with backslashes before the characters that are specified in the charlist parameter.
str Text string
charlist
characters to be removed. If charlist contains the characters \n, \r, and others, they are converted to C-style. Other non-alphanumeric ASCI characters with lengths less than 32 and greater than 126 change.
When you define a sequence of characters in a charlist argument, make sure you know what characters you put as the beginning and end of the range.
echo addcslashes('foo[ ]', 'a..z');// Values.// Removes all upper and lower case letters
Returns the modified string.
$escaped = addcslashes($not_escaped, "\0..\37!@\177..\377");
charlist \0..\37!@\177..\377, removes all characters with ASCII code between 0 and 31.
Jan Barášek Více o autorovi
Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.
Rád vám pomůžu:
Články a novinky nejen ze světa PHP a programování. Nenechte si ujít jediný článek.
Články píše Jan Barášek © 2009-2025 | Kontakt | Mapa webu
Status | Aktualizováno: ... | en