Why should you learn PHP when there are two many “better” languages available? It’s easy to learn. You can build practical web apps within a week of starting. Finally a huge number of legacy web apps such as WordPress, Drupal, and many of the open source projects that you download were coded in PHP. To be a professional you’ll need to have 5 or more languages under your belt, and although PHP may not be the one you end up preferring to use, it’s a good one to be comfortable with.
The foreach() function can turn Named Keys into variables just like it does array values.
The sort() and sort() functions allow you to sort arrays alphabetically.