[eluser]davehedgehog[/eluser]
hi basically what im trying todo is remover the venue where it repeats its self during and echo. at the moment it work but for only the next entry because or the for each. heres the code~
Code:
<?php $prevenue=false;?><?php $pretitle=false;?>
<?php if ($education): ?>
<?php foreach($education as $ed): ?>
<table class="table" >
<?php if($prevenue == $ed['place']){
$ed['place'] = '';
}else{?>
<tr><td>Venue of study:<td><?php echo $ed['place']; ?></tr>
<?php } ?>
<tr><td>from:<td><?php echo $ed['datefrom']; ?><td>To:<td><?php echo $ed['dateto']; ?></tr>
<tr><td>Title: <td><?php echo $ed['title']?></tr>
<tr><td>Module: <td><?php echo $ed['module']?></tr>
<tr><td>Description: <td><?php echo $ed['description']?></tr>
<?php $prevenue = $ed['place'];?>
</table><?php endforeach;?><?php else: ?>
<br></br>
<p>
There are no education for this portfolio.
</p><?php endif;?>
I want to change this to a while so that for every echo if the venue is there then dont repeat, but when I try while it falls over, any help?