views:

56

answers:

1

I was looking for a function that does the reverse of $this->db->escape() to get the original string when it was still unescaped.

I have tried searching for it in the Codeigniter docs. I don't think I can find one.

I also tried finding a native PHP function for it( since it uses mysql_real_escape_string when using MySQL) but so far the closest thing that I can find is stripslashes()

+3  A: 

stripslashes will unescape the string correctly.

Emil Vikström
As I said, it is the only PHP function that exists that comes close to unescaping strings. I am interested in other ways to unescape strings but if I can't find one then this will have to do.
arvinsim