section/array/isset problem

From: Date: Sun, 20 Jan 2002 20:45:55 +0000
Subject: section/array/isset problem
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2550@lists.php.net to get a copy of this message
Hi, I want to check if a variable is set. I am using the following line: {if isset($check_project[$projects[listing].id])} Smarty is complaining that this is not a valid command. Even {$check_project[$projects[listing].id]} is not working. $check_project is an array. Here is my code: {section name=listing loop=$projects} <tr> <td></td> <td class="regular"><input type="checkbox" name="project[{$projects[listing].id}]" value="{$projects[listing].id}" {if isset($project[$projects[listing].id])} checked {/if}> {$projects[listing].name} &nbsp; <input type="checkbox" name="check_project[{$projects[listing].id}]" value="{$projects[listing].id}" {if isset($check_project[$projects[listing].id])} checked {/if}> lalala &nbsp; {$check_project[$projects[listing].id]} &nbsp; lalala Freischalten </td> </tr> {/section} What am I doing wrong ? Thanks for your help, Kai ________________________________________________ Agentpark - Ihr Partner fuer professionelle Java Loesungen ________________________________________________ Kai Kramhoeft kai@agentpark.de Hoekerstr. 7 http://www.agentpark.de 27568 Bremerhaven Tel.: 0471-9515068

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