RSS Feed/News Avoiding multiple foreach loops in this template code?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
29,517
Points
823

Reputation:

We place new members in a trial group until they hit criteria for full membership. Within conversations, we want to show a small single line notice to full members if there's a single participant in the trial group, or a larger notice with a list of members in this group if there's multiple members in the trial group.

I trial-and-error'd my way to working code, but it seems inefficient to use one foreach just for counting (to determine which notice to display) and another for displaying...

Read more

Continue reading...
 
Status
Not open for further replies.
Top