<?php function str_replace_chr(string $str, int $position, string $format): string { $chr = $str[$position - 1]; $p1 = $position - 1; $p2 = ($p1 + 1 ) - strlen($str); $replace = sprintf($format,$chr); return substr_replace($str,$replace,$p1,$p2); } echo str_replace_chr('VietJack Team', 5, '<span style="color: red;">%s</span>');
You have javascript disabled. You will not be able to edit any code.