News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1257972388:v:use_geshi-1:v:type-php

Started by Guest, Nov 11, 2009, 08:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guest

<?php
include(dirname(__FILE__) . '/txt.english.php');
$dupes = array();
$vals = array_values($txt);
$vals = array_unique($vals);

foreach ($vals as $val)
   $dupes[$val] = array_keys($txt, $val);

$txt = '';

echo '<?php
';

foreach ($dupes as $key => $dupe)
   echo '$txt[\'' . implode('\'] = $txt[\'', $dupe) . '\'] = \'' . strtr($key, "'", "\'") . "';\n";

echo '
?'.'>';
//print_r($dupes);
?>