libs/helpers/SystemHelper.php
public static function strFindAndReplaceAll($vars = array(), $str)
    {
        if (array_count_values($vars) > 0){
            foreach ($vars as $key => $val) {
                for ($i = substr_count($str, $key); $i > 0; $i--) {
                    $str = \WebCMS\Helpers\SystemHelper::strlReplace($key, $val, $str);
                }
            }
        }
        return $str;
    }
public static function strFindAndReplaceAll($vars = array(), $str)
    {
        if (array_count_values($vars) > 0){
            foreach ($vars as $key => $val) {
                for ($i = substr_count($str, $key); $i > 0; $i--) {
                    $str = \WebCMS\Helpers\SystemHelper::strlReplace($key, $val, $str);
                }
            }
        }
        return $str;
    }
public static function strFindAndReplaceAll ( $ vars = array ( ) , $ str ) { if ( array_count_values ( $ vars ) > 0 ) { foreach ( $ vars as $ key => $ val ) { for ( $ i = substr_count ( $ str , $ key ) ; $ i > 0 ; $ i -- ) { $ str = \ WebCMS \ Helpers \ SystemHelper :: strlReplace ( $ key , $ val , $ str ) ; } } } return $ str ; }
Replace all needles found in str with rewrites
@param Array[needle, rewrite]
@param string $str
@return string $str
Replace all needles found in str with rewrites