Skip to content

Instantly share code, notes, and snippets.

@panfeng
Last active August 29, 2015 14:07
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 panfeng/e1b6a6613b40eb8dd4c1 to your computer and use it in GitHub Desktop.
Save panfeng/e1b6a6613b40eb8dd4c1 to your computer and use it in GitHub Desktop.
<?php
$volcabulary =array (
0 => 'Handelsfreiheit',
1 => 'Handel (Händler)',
2 => 'Handel, auswärtiger',
3 => 'Handelsbilanz',
4 => 'Handelskapital',
5 => 'Zweck',
6 => 'Zyklus, industrieller',
7 => 'Handelsbilanz',
);
$unique_volcabulary = array_unique($volcabulary);
echo "<pre>";
var_dump($unique_volcabulary);
echo "</pre>";
$volcabulary_id = array(0=>'');
foreach ($unique_volcabulary as $item) {
$volcabulary_id[] = $item;
$code=mb_detect_encoding($item);
echo $code." : ".$item."<br />";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment