php – Why does “unset” only remove the key?

Question

I tried to remove a array element from a selection box/dropdown menu. But when I use “unset”, Worpdress only removes the key not the full 2 dimensional element.

example: unset “gb”
option value: gb key: Great Britain
result: gb

How do I remove the full 2 dimensional element from my $country array (woocommerce)?

I just tried it 3 hours now. Can somebody help me out?

0
fuxia 5 months 2021-05-21T13:36:53-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse