kickassamd Posted September 2, 2007 Share Posted September 2, 2007 I have an array that looks like this Array ( [0] => Array ( [name] => Account [submenu] => Array ( [0] => Array ( [name] => Create Account [link] => ) [1] => Array ( [name] => Manage Account [link] => ) [2] => Array ( [name] => Cancel Account [link] => ) ) ) ) And im trying to use it in smarty like so <{foreach from=$ACMS_MENU item=menu}> <div class="sidebox"> <h1 class="clear"><{$menu.name}></h1> <ul class="sidemenu"> <{foreach from=$ACMS_MENU.submenu item=subitem}> <li><a href="<{$ACMS_URL}><{$subitem.link}>" class="top"><{$subitem.name}></a></li> <{/foreach}> </ul> </div> <{/foreach}> So far no luck... Any ideas? The first foreach loop works, the second that prints the subitems does not. Link to comment https://forums.phpfreaks.com/topic/67598-solved-smarty-help/ Share on other sites More sharing options...
Ken2k7 Posted September 2, 2007 Share Posted September 2, 2007 Don't you have to use parentheses for the foreach statement? Link to comment https://forums.phpfreaks.com/topic/67598-solved-smarty-help/#findComment-339595 Share on other sites More sharing options...
kickassamd Posted September 2, 2007 Author Share Posted September 2, 2007 I take it you have never used Smarty? No you dont have to use parentheses. Link to comment https://forums.phpfreaks.com/topic/67598-solved-smarty-help/#findComment-339597 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.