To access the data stored in a MySQL database, you should first connect to MySQL database server. PHP offers two different ways to connect with the MySQL database.
The PHP addslashes function is used to add backslashes in front of some predefined characters in a string. This function is case-sensitive.
Escape characters are the equivalent characters for a purpose. The main purpose of using an escape character is to notify the compiler or interpreter, that a particular character is having special meaning rather than it’s normal meaning.
The PHP addcslashes function is used to adds backslashes in front of the specified characters.
The PHP chop function is used to remove white-space or other characters from the right end of a string. This is an alias of rtrim() function and is case-sensitive.