Grouping by Categories then Sub-Categories

2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 11, 2011   (RSS)

Re: [MickC] Grouping by Categories then Sub-Categories

By Jason - October 11, 2011

Hi,

So you want the branch heading to change if the current branch is different from the previous branch, or if the type has changed. Is that right?

If so, you could change your if statement like this:

if ($branch != $old_branch || $type != $old_type) { // If different from the last sub-group value, print the sub-group name.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/