kinaski Posted February 9, 2009 Share Posted February 9, 2009 Hi Folks, I really hope that someone out there can help me.. Here is my problem: I'm trying to setup my site using joomla, but had to dig into the code to make some modifications myself. I have a component where I display some categories with links to articles like this: <?php foreach($this->list as $l): ?> <li class="article-intro-list"> <h3 class="article-title"><a href="<?php echo $l->link; ?>" ><?php echo $l->title; ?></a><span>+</span></h3> <div class="collapse"> <?php echo $l->description; ?> <div class="loadPopUp"><a href="<?php echo $l->link; ?>" title="<?php echo $l->title; ?>" class="mb" rel="width:730,height:500"><span class="howdoi_icon"><img src="images/more.gif" alt="Read more" /></span> Read more...</a></div> </div> </li> <?php endforeach; ?> What this list array contains is also a reference to a groupId of the category, which can be retrieved simply by: <?php echo $l->groupId; ?> And also the group title by <?php echo $l->groupTitle; ?> I would like to group these categories by their groupId into a separate div with a title for each group. I really can't figure out that... although it seems pretty straightforward... Still not so good in php Thanks so much in advance! Link to comment https://forums.phpfreaks.com/topic/144468-group-these-records-by-groupid-in-a-separate-div/ Share on other sites More sharing options...
kinaski Posted February 9, 2009 Author Share Posted February 9, 2009 Bump! Anyone please?? Link to comment https://forums.phpfreaks.com/topic/144468-group-these-records-by-groupid-in-a-separate-div/#findComment-758151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.