smarty and again an associative array :(

From: Date: Fri, 19 Sep 2003 21:18:52 +0000
Subject: smarty and again an associative array :(
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10243@lists.php.net to get a copy of this message
Hi Smartys :D Can you help me, to solve my problem? I have the following php code: --------------------------------------------------- if ( isset ( $mail_empfaenger ) ) { $i = 0; while ( !$mail_empfaenger->EOF && $i < 71 ) { $aktive_empfaenger['section_index'][$i] = $i; $aktive_empfaenger['newsletter_id'][$i] = $mail_empfaenger->fields[0]; // ID des Abonnenten $aktive_empfaenger['newsletter_name'][$i] = $mail_empfaenger->fields[1]; // Name des Abonnenten $aktive_empfaenger['newsletter_mail_adresse'][$i] = $mail_empfaenger->fields[2]; // Mailadresse des Abonnenten $aktive_empfaenger['newsletter_status'][$i] = $mail_empfaenger->fields[3]; // Status des Abonnenten $i++; $mail_empfaenger->MoveNext ( ); } // end while } // end if --------------------------------------------------- and the following assignment: --------------------------------------------------- $smarty->assign ( array ( "SECTION_INDEX" => $aktive_empfaenger['section_index'] ) ); --------------------------------------------------- Is there any possibility to parse this HTML code correctly: --------------------------------------------------- <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <tr align="center"> <td width="124" align="left">Name:</td> <td width="234" align="left">Adresse:</td> <td width="42" align="right">Aktiv:</td> </tr> <!--{section name=daten loop=$SECTION_INDEX}--> <!--{strip}--> <tr align="center"> <td align="left"> <!--{$SECTION_INDEX[daten].newsletter_name}--> </td> <td align="left"> <!--{$SECTION_INDEX[daten].newsletter_mail_adresse}--> </td> <td align="right"> <input name="<!--{$SECTION_INDEX[daten].newsletter_id}-->" type="checkbox" id="name" value="1" <!--{if $$SECTION_INDEX[daten].newsletter_status == 1 }-->checked<!--{/if}-->> </td> </tr> <!--{/strip}--> <!--{/section}--> </table> -------------------------------------------------- I tried to reproduce the code from the documentation, but it doesn´t work, i think i is because of the assignment? Thank you for spending your time greetings - bastian -- http://www.haustierworld.de

« previous php.smarty.general (#10243) next »