Adds backslashes before letters and before a number at the start of a string.
Parameters
$value
stringrequired- Value to which backslashes will be added.
Source
function backslashit( $value ) {
if ( isset( $value[0] ) && $value[0] >= '0' && $value[0] <= '9' ) {
$value = '\\\\' . $value;
}
return addcslashes( $value, 'A..Za..z' );
}
Changelog
Version | Description |
---|---|
0.71 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.