<?php mb_regex_encoding('SJIS'); $string = mb_convert_encoding("hello ここに文を入れる。", "SJIS", "UTF-8"); $pattern = "hello"; $replacement = 'hi'; //expected result: hi ここに文を入れる。 //but it returns NULL $output = mb_ereg_replace($pattern, $replacement, $string); var_dump(mb_convert_encoding($output, "UTF-8", "SJIS"));
You have javascript disabled. You will not be able to edit any code.