Skip to content

Instantly share code, notes, and snippets.

@KostasBlank
Created November 20, 2017 12:39
Show Gist options
  • Save KostasBlank/5e92984600afcf3695a6929d8d3b0327 to your computer and use it in GitHub Desktop.
Save KostasBlank/5e92984600afcf3695a6929d8d3b0327 to your computer and use it in GitHub Desktop.
function no_greek_punctuation($source){
$newphrase="";
$newphrase= str_replace("ά", "α", $source);
$newphrase= str_replace("έ", "ε", $newphrase);
$newphrase= str_replace("ί", "ι", $newphrase);
$newphrase= str_replace("ό", "ο", $newphrase);
$newphrase= str_replace("ή", "η", $newphrase);
$newphrase= str_replace("ύ", "υ", $newphrase);
$newphrase= str_replace("ώ", "ω", $newphrase);
$newphrase= str_replace("Ά", "Α", $newphrase);
$newphrase= str_replace("Έ", "Ε", $newphrase);
$newphrase= str_replace("Ί", "Ι", $newphrase);
$newphrase= str_replace("Ό", "Ο", $newphrase);
$newphrase= str_replace("Ή", "Η", $newphrase);
$newphrase= str_replace("Ύ", "Υ", $newphrase);
$newphrase= str_replace("Ώ", "Ω", $newphrase);
return $newphrase;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment