I can't get in_array() to work

From: Date: Mon, 02 Jul 2001 11:34:33 +0000
Subject: I can't get in_array() to work
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1103@lists.php.net to get a copy of this message
Hi! I'm having a problem when calling PHP's function 'in_array(item, array)' from inside a template: {section name="anl" loop=$anl_info} ... <td class="textA{if in_array($anl_info[anl].typ, $soek_typer}{/if}">{$anl_info[anl].typ}</td> ^---------------------------------------------------------------^ {/section} The if statement compiles to: <?php if ( in_array ( $anl_info[anl].typ, $this->_tpl_vars['soek_typer']): ?> <?php endif; ?> but it should be, i think: <?php if ( in_array ( $this->_tpl_vars['anl_info'][$_smarty_sections['anl']['properties']['index']]['typ'], $this->_tpl_vars['soek_typer']): ?> <?php endif; ?> What can I do? because I really nedd to find out if this is true in some way. regards, tomas

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