|
I had a flash in a dream, or something like it, that you could just remove the ksort and run the script, and then run a diff of the result of that, to confirm the script does not screw up anything in the strings themselves. But then, I guess you had a solution already.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ksort($string,SORT_STRING);
foreach($string as $k=>$v){
$current=str_replace("'","\'",$v);
$current=htmlspecialchars($current,ENT_NOQUOTES)
echo "$"."string['$k'] = '".$current."';\n";
}