Mulit list generating content
Ok, I have made some progress, but still no cigar, the code almost works,
the for loop finds the first match fantastically, but doesnt find the rest of the matches in the foreach
Any ideas ?
<?php foreach ($corporatesRecords as $record): ?>
<h3><?php echo htmlencode($record['title']) ?></h3>
<?php $list = join(',', $record['project_team:labels']);
$array = explode(",", $list);
$count = count($array);
$arraynum = 0;
<?php foreach ($eunomix_teamRecords as $et): ?>
<?php for ($offset = 0; $et['name'] == $array[$offset]; $offset++ ): ?>
<?php echo htmlencode($et['name']) ?> <?php echo $offset?><br />
I think I need to see the front end result of this. Failing that, have you tried using showme() on the variables in each stage of the loops to see what exactly is going on with them? The fastest way to find out why something doesn't show up is to check what your variables are set to at the point where they should appear.
Save time by getting our experts to help with your project.