Multiple choice technology web technology

If one wants to convert all single-quotes (') to a backslash followed by a single-quote (') which of the following can be used to achieve the above?

  1. addslashes()

  2. appendslashs()

  3. addbackslash()

  4. removeslash()

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

addslashes() escapes single quotes by adding a backslash before them, converting ' to \'. The other options are not valid PHP functions - appendslashs(), addbackslash(), and removeslash() do not exist in PHP's string function library.