Reputation: 11275
I have an email address enclosed in single quotes:
$email = "'[email protected]'";
I want to remove the single quotes to obtain:
$email = "[email protected]";
I think [email protected]
itself may also contain single quotes if I am not wrong. Is there a neat solution for this?
Upvotes: 1
Views: 568
Reputation: 522635
Remove surrounding quotes if present:
$email = trim($email, "'");
Upvotes: 3