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-1257997538:v:use_geshi-1:v:type-php

Started by Guest, Nov 12, 2009, 03:45 AM

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 '
?'.'>';
?>