Unflow Export enthaelt keine & mehr

This commit is contained in:
Andreas Österreicher
2010-06-18 10:23:02 +00:00
parent 4f0f8a3abc
commit 1d2d3003e9
2 changed files with 23 additions and 1 deletions
+21
View File
@@ -739,4 +739,25 @@ function isint( $mixed )
return ( preg_match( '/^\d*$/' , $mixed) == 1 );
}
/**
* Multibyte String Replace
*
* @param $needle
* @param $replacement
* @param $haystack
* @return string
*/
function mb_str_replace( $needle, $replacement, $haystack )
{
$needle_len = mb_strlen($needle);
$pos = mb_strpos( $haystack, $needle);
while (!($pos ===false))
{
$front = mb_substr( $haystack, 0, $pos );
$back = mb_substr( $haystack, $pos + $needle_len);
$haystack = $front.$replacement.$back;
$pos = mb_strpos( $haystack, $needle);
}
return $haystack;
}
?>