Development,  PHP,  PL

Country codes as PHP array

EN: I’m working on some client’s site and found myself in need of country names and codes written as PHP array. As finding the right list is relatively easy (maybe except polish names…) it was a bit harder to find it as PHP code. So I took Wikipedia list (it has all informations I need) and parse it to PHP array. Here is result, you may copy it for your project.

PL: Pracując nad projektem dla klienta, zdałem sobie sprawę, że będę potrzebował listy państw wraz z ich kodami. Nie znalazłem takiej listy (szczególnie z polskimi nazwami), więc wziąłem listę z Wikipedii i przerobiłem na kod. Dodatkowo ten kod sobie wyświetlam jako źródło PHP. Bierzcie i kopiujcie z tego wszyscy #pdk, jak ktoś potrzebuje.

One Comment

Leave a Reply to Wojtek Cancel reply

Your email address will not be published. Required fields are marked *