How can I find and replace such characters as ˇ in a string? When I copied these to a simple str_replace method, was not any effect. It comes from an MS Access Database by PDO and ODBC.
Thank you!
How can I find and replace such characters as ˇ in a string? When I copied these to a simple str_replace method, was not any effect. It comes from an MS Access Database by PDO and ODBC.
Thank you!
What are you trying to replace it with?
Also note that if you're trying to replace multiple characters at once, you need to pass in an array of these characters.
For example, if you're trying to simply remove these characters via str_replace
, the following would work:
$test = "├ę ├│ tester";
$result = str_replace(["├ę", "├│"], "", $test);
print_r($result);
Results in :
tester
If you're trying to strip out any non-standard characters, look into using regex.