/", $body, $match); foreach( $match[0] as $val ) { //絵文字のキーを抜き出す preg_match("/[A-Z0-9]{4}?/", $val, $key); //絵文字を導き出す $emoji = Convert($key[0]); $body = str_replace($val, $emoji, $body); } echo str_replace('%doctype%', $mobile_data['doctype'], $header); echo $body; ?>