I am creating a php application to format files. So I need to apply a find-replace process while maintaining the case.
For example, I need to replace 'employees' with 'vehicles'.
$file_content = "Employees are employees_category MyEmployees kitEMPLOYEESMATCH";
$f = 'employees';
$r = 'vehicles';
echo str_ireplace($f, $r, $file_content);
Current Output:
vehicles are vehicles_category Myvehicles kitvehiclesMATCH
Desired Output:
Vehicles are vehicles_category MyVehicles kitVEHICLESMATCH