Groups
Groups
Sign in
Groups
Groups
Smarty Developers
Conversations
About
Send feedback
Help
Smarty 3 associative array with key="null"
18 views
Skip to first unread message
Abalam
unread,
Feb 27, 2009, 9:06:34 AM
2/27/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Smarty Developers
Hi,
It seems that {$item.null} returns nothing, but {$item["null"]} works.
$item = array("null"=>true)
Regards,
Yann
U.Tews
unread,
Feb 28, 2009, 9:05:12 AM
2/28/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Smarty Developers
Yann
null, true, false are not unquoted strings. They are interpreted as
the PHP values null, true false.
If you want to use null as array index you must quote it.
{$item.'null'}
Uwe
Abalam
unread,
Feb 28, 2009, 12:40:00 PM
2/28/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Smarty Developers
OK, just noticing it's different from Smarty 2 for that case.
Regards,
Yann
U.Tews
unread,
Feb 28, 2009, 1:55:19 PM
2/28/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Smarty Developers
I just changed some unqouted string handling. {$item.null} should work
now.
Uwe
Reply all
Reply to author
Forward
0 new messages