Are the output results the same? 10 5.3.6 Warning: addcslashes() expects exactly 2 parameters, 1 given in /data/bookuu/test/class.php on line 50 Who’s John Adams? One reports an error and the other outputs normally. why? addslashes and addcslashes are not the same function. I found that there is no difference, only one character. But both functions do the same thing - escape strings. What's the difference? addslashes has only one parameter - a string addcslashes requires two parameters, string and delimiter. echo addcslashes("Who’s John Adams?","’"); If you write it like this, the output will be normal. Hope it can help everyone understand the usage of addslashes. |