0

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!

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
Gábor Varga
  • 840
  • 5
  • 15
  • 25

1 Answers1

0

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.

Community
  • 1
  • 1
ShaneOH
  • 1,454
  • 1
  • 17
  • 29