<?php $string=' دد'; var_dump(preg_replace('#(?:^\s+|\s+$)#u', '', $string));
You have javascript disabled. You will not be able to edit any code.