- htmlentities: documentation ( source)
<?php
function clean_field($content){
$result = htmlentities($content, ENT_COMPAT | ENT_IGNORE, "UTF-8");
return $result;
}
echo clean_fields(" uyhweifyh ");
echo clean_fields("");
echo clean_fields(NULL);
echo clean_fields(" Bastión SL ");
echo clean_fields("'Bastión SL'");
?>