سلام بر دوستان و بزرگان انجمن
یک تابع دارم به شکل زیر:
کد PHP:
function clear_string($str) {
$clear_text = htmlentities($str, null, 'UTF-8');
$clear_text = str_ireplace([' ','‌'], [' ', ' '], $clear_text);
$clear_text = preg_replace('/&#?[a-z0-9]+;/i', '', $clear_text);
$clear_text = html_entity_decode($clear_text);
$clear_text = preg_replace('/\s+/', ' ', $clear_text);
$clear_text = trim($clear_text);
return $clear_text;}
میخوام شما بگید به شکل مرحله به مرحله داره رو متنی که گرفته چه عملیاتی رو پیاده میکنه؟
تشکر