note 102141 modified in ref.mbstring by danbrown
| From: | danbrown@php.net | Date: | Fri, 28 Jan 2011 22:21:55 +0000 |
| Subject: | note 102141 modified in ref.mbstring by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176486@lists.php.net to get a copy of this message | ||
This small mb_trim function works for me.
<?php
function mb_trim( $string )
{
$string = preg_replace( "/(^\s+)|(\s+$)/us", "", $string );
return $string;
}
?>
--was--
This small mb_trim function works for me.
function mb_trim( $string )
{
$string = preg_replace( "/(^\s+)|(\s+$)/us", "", $string );
return $string;
}
http://php.net/manual/en/ref.mbstring.php