Reputation: 3
I have text with alot of non-standard characters and they are stored like this in database:
ΓΓÇôΓÇ₧ΓΓÇôΓÇ₧
Is there a way to filter them or replace them with nothing?
Upvotes: 0
Views: 425
Reputation: 13085
I would use a regular expression
echo preg_replace("/&#\\d+;/", "", $textWithWeirdCharacters);
Upvotes: 1
Reputation: 1347
Make an array with the non-standard characters you don't want. And then apply next code to it.
<?php
$blockChars = array('Γ', '...');
$string = str_replace($block, array_fill(0, count($blockChars), ''), $string);
?>
Upvotes: 0