function clean_up( $text ) {
$unwanted = array("'"); // add any unwanted char to this array
return str_ireplace( $unwanted, '', $text );
}
<?php
if(isset($_POST['submit'])){
$variable = clean_up($_POST['fieldhere']);
}
?>
no.You must be registered for see links
$var = trim($_POST['var'], "'\"");