Skip to content

Instantly share code, notes, and snippets.

@anova
Created April 30, 2014 13:47
Show Gist options
  • Save anova/03102847955c881ef762 to your computer and use it in GitHub Desktop.
Save anova/03102847955c881ef762 to your computer and use it in GitHub Desktop.
html encode turkish
<?php
//htmlencode turkish
function htmlencode_tr($input) {
return str_replace(
array('ç', 'ğ', 'ı', 'ö', 'ş', 'ü', 'Ç', 'Ğ', 'İ', 'Ö', 'Ş', 'Ü'),
array('&#231;', '&#287;', '&#305;', '&#246;', '&#351;', '&#252;', '&#199;', '&#286;', '&#304;', '&#214;', '&#350;', '&#220;'),
$input);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment