kein plan, was du da versuchst. aber was spricht dagegen, ein array
$trans[>>ID<<] = >>WORD<<;
zu erstellen???
$trans[>>ID<<] = >>WORD<<;
zu erstellen???
....
// Du weißt welche Werte benötigt werden
$IDsNeeded = array(1,3,6,12,56,23 .... ) ;
$lcl = localise($IDsNeeded,$session->language(),$db);
...
print $lcl[1];
....
print $lcl[12];
function localize($array,$language,&$dbo) {
$sql = "SELECT id, phrase FROM table WHERE lang = '".mysql_real_escape_string($language). "' AND id IN (".implode(',',$array).")";
$result = $dbo->query($sql);
$lcl=array();
while ($row = $result->fetch())
$lcl[$row['id']] = $row['phrase'];
}
return$lcl;
function getWithID($TEXTID) {
....
// Logging
if (DOLOGTEXTID) {
$sql = "INSERT INTO LogTxtPerPage SET
seite = '".mysql_real_escape_string($_SERVER['SCRIPT_FILENAME'])."',
textid = '".$TEXTID;
}
...
}
Kommentar