How can i clear one value if there is a equal version. Here my array
[1] => Array
(
[name] => Peter
[city] => Texas
)
[2] => Array
(
[name] => Hans
[city] => New York
)
[3] => Array
(
[name] => Lex
[city] => Texas
)
So that i only get in my foreach one time Texas
<ul>
<?php foreach ($array as $newarray) ?>
<li><?php echo $newarray['city']; ?></li>
<?php endforeach; ?>
</ul>
Update:
I try it this way put all cityies in an array. ($array) With print_r i got this.
Array
(
[0] => Vorarlberg
)
Array
(
[0] => Niederösterreich
)
Array
(
[0] => Niederösterreich
)
After that i try <?php array_unique($array, SORT_REGULAR); ?>
and with <?php echo array_unique($regionen, SORT_REGULAR); ?>
i only get three thimes "Array".
Best Regards