This is a part of the code that I took:
{foreach from= $nav _list name=nav_list Item=nav}
| {$nav. Title} |
| Agency profile |
{if! $smarty. Foreach.nav_list.last}
{/if}
{/foreach}
Reply to discussion (solution)
Who's to look at it? Thank you.
{foreach from= $nav _list name=nav_list item= $nav}
Isn't anyone using smarty now?
What problem are you having now?
What problem are you having now?
No loops, this is a column of two lines, I want to loop out the effect of the picture.
You can use your original program more than a few times on the line,
/** +----------------------------------------------------------* Get navigation menu * $parent _id get first-class navigation by default * $current _module Current page model name * $current _id current page category ID +----------------------------------------------------------*/function get_nav1 ($ parent_id = 0, $current _module = ", $current _id =", $type = ' middle ') {$sql = "select * from". $this->table (' Nav '). "WHERE topid = ' $parent _id ' and (navid=1 or navid=2) ORDER by Sort,navid ASC", $query = $this->query ($sql); while ($row = $this->fetch_array ($query)) {if ($row [' module '] = = ' Nav ') {$url = $row [' Guide '];} ElseIf ($row [' quanpin '] = = 1) { $url = $row [' module '];} else{$url = $this->rewrite_url ($row [' module '], $row [' Guide ');} $nav _list[] = array ("id" = = $row [' Navid '], "nav_name" + $row [' title '], "url" = = $url, "sort" + = $row [' Paixu '], "Eng" = $row [' eng ']);} return $nav _list;}
According to this, there are not 9 columns, you can get 9 such a No.