0

Hello all,

I've been searching all day for a solution to this. I have the following code:

<?php foreach ($software_serialRecords as $record): ?>

<?php $programLimit = array(); ?>
<?php $programLimit[] = $record['program']; ?>
<?php $programLimit = array_unique($programLimit); ?>


<?php for ($i = 0; $i<count($programLimit); $i++) { ?>

<option value="software_serials_program.php?program=<?php echo $record['program'] ?>"><?php echo ($programLimit[$i]) ?></option> 
<?php $maxCols=1; if (@++$count % $maxCols == 0): ?> 
<?php endif; ?>

<?php ;} ?>

<?php endforeach ?>

I can get the drop down to display the "programs" i need, but it keeps ignoring the "array_unique" command. I read somewhere that sometimes the loops don't like "echo" so I tried "print_r" but still no difference. I also tried using "foreach" instead of the "for" loop, but same results.

Any ideas??

Thanks!
Gab

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Gabums
0

Sorry still nothing. Putting that line outside the foreach loop either returns no value or the value keeps saying "Array" over and over again...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.