I have a PHP array as below :
Array
(
[0] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)
[1] => Microsoft Network Adapter Multiplexor Driver
[2] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client) #75
[3] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)
)
I need to identify duplicate values from PHP array and rename using number at the end as below,
Array
(
[0] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_1
[1] => Microsoft Network Adapter Multiplexor Driver
[2] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client) #75
[3] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_2
)
I tried array_count_values() to detect duplicates but how can i rename it ? https://onlinephp.io/c/739cb