PHP Questions Home

Categories

Arrays
Files
Forms
Functions
Images
MySQL
Numbers
Others
Strings
Website


PHP Functions

PHP Functions


More PHP

Top Questions
Ask a Question

How do I remove escape characters from data?


You can do this using the stripslashes function, so for instance here is an example of removing the escape characters before apostrophes in a string:

<?php
$data 
"I\'m the king of the castle";
echo 
stripslashes($data); //I'm the king of the castle
?>



More forms PHP Questions

What are magic quotes?
How do I remove HTML tags from a string?
How do I check for an empty field in a form?
How can I check a value entered in a field on my form is a number?
How do I email the contents of a form to me?