Using variables to point to array positions.

From: Date: Mon, 12 May 2003 11:52:03 +0000
Subject: Using variables to point to array positions.
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9519@lists.php.net to get a copy of this message
Hi All, I can't seem to get the following working: assume that $transaction.transactionCreator = 22 {$ticket.users[$transaction.transactionCreator].name|escape:"htmlall"} ({$transaction.transactionCreator}) {$transaction.transactionCreated|escape:"htmlall"} I have tried a number of different syntax changes but so far haven't had any luck. Now if i replace $transaction.transactionCreator with 22 then all is well but i really need to be able to point to an array position with another variable, can this be done? I can work arround it by putting a reference to the correct variable before the data gets assigned to smarty but that just seems like complicating the issue. Thanks in advance. -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk http://wb.pro-net.co.uk

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