I have an email address enclosed in single quotes:
$email = "'test@email.com'";
I want to remove the single quotes to obtain:
$email = "test@email.com";
I think test@email.com itself may also contain single quotes if I am not wrong. Is there a neat solution for this?
You can use the function trim() to remove the enclosing single quotes: