Skip to content

Instantly share code, notes, and snippets.

@takacsv
Created May 3, 2012 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takacsv/2589556 to your computer and use it in GitHub Desktop.
Save takacsv/2589556 to your computer and use it in GitHub Desktop.
ékezetes névelős dolog.
function nevelo($kategoria)
{
$maganhangzok = array(
97, 192, 193, 194, 195, 196, 197, 224, 225, 226, 227, 228, 229, 69,
101, 200, 201, 202, 203, 232, 233, 234, 235, 73, 105, 204, 205, 206,
207, 79, 210, 211, 212, 213, 214, 242, 243, 244, 245, 246, 111, 85,
117, 217, 218, 219, 220, 249, 250, 251, 252 );
$nevelo = 'A';
if (in_array(ord(substr($kategoria, 0, 1)), $maganhangzok))
{
$nevelo = 'Az';
}
return $nevelo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment