I would like to delete duplicate entries and then count them to display them next to my entries in my php ROW
I've already tried this:
<?php
foreach (array_unique($events) as $eventorga) {
$eventorgan = $eventorga['organizer'];
echo $eventorga['organizer'].'</br>';
}
?>
But an error: Array to string conversion is returned to me
<?php
foreach ($events as $eventorga) {
echo $eventorga['organisateur'].'</br>';
}
?>
Currently, my code returns this result:
Holyblood
Nessy
Pokégaia
Sorrow
JOHN
Holyblood
(From my MYSQL database)
I would like the return to be that:
Holyblood - 2
Nessy - 1
Pokégaia - 1
Sorrow - 1
JOHN - 1