On 08-10-2008 at 23:57:05 Axel Zöllich <[EMAIL PROTECTED]> wrote:

$ergebnis = $mysqli->query("SELECT * FROM farbe");
while ($zeile = $ergebnis->fetch_object()) {
  $typen[farben][][kuerzel] = $zeile->kuerzel;
  $typen[farben][][bez] = $zeile->bez;

On each loop iteration you're creating two array elements in $typen[farben], one with *only* "kuerzel" key, and another one with *only* "bez" key.

Your PHPTAL template seems to expect that every array element has both keys. If you wanted both keys in one element, then use something like this:

$typen['farben'][] = array(

and if you really want array with keys interlaced, then add tal:condition="exists:farbe/bez" and tal:condition="exists:farbe/kuerzel" on elements which use these expressions.

regards, Kornel

PHPTAL mailing list

Reply via email to