当前位置: 代码迷 >> PHP >> php除了字符串首尾中英文空格
  详细解决方案

php除了字符串首尾中英文空格

热度:326   发布时间:2012-10-27 10:42:26.0
php去除字符串首尾中英文空格


/**
 * 去除空格(包括中英文空格)
 * User: yangyingjie
 * qq: 471156231 
 */
function  mbTrim($str)
{
    return mb_ereg_replace('(^( | )+|( | )+$)', '', $str);
}



  相关解决方案