getting value assign()'d
| From: | Matt Warden | Date: | Thu, 02 Jun 2005 02:29:47 +0000 |
| Subject: | getting value assign()'d | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-12651@lists.php.net to get a copy of this message | ||
List,
I have been looking through the documentation, but cannot figure this
out. I wish to retreive a array set using assign() from PHP.
Basically, I want to do this because there are a complicated set of
conditions that sets this template variable and I would also like to
assign the count of this array (I could do it in Smarty itself, but I
woudl rather not). Rather than adding an assign() to every condition
(which actually wouldn't solve the problem anyway, but that's to
complicated to explain why), I would rather just do something like
this:
$smarty->assign('myArrayCount', count($smarty->get('myArrayCount')));
There *has* to be a way to do this, but I just can't find it (is there
a traditional phpdoc somewhere? I find that easier to answer these
kinds of questions than manual-style documentation).
Thanks,
--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.