We have just lauched a site with 26 PHP exercises, beginner to intermediate. It covers variables, control structures, forms, arrays and functions among other things. You start with the problem, then click a button to see the answer script code. Along with the answer script is a link to the output of the answer code. Come see at .
This PHP exercise has two parts. In the first, you will take the large cities array from Arrays Ex. #5 and transform it into a multi-dimensional array. That will become the data in a table.
The PHP programming exercises progress from the simplest scripts ("Hello world!") to more complex. More difficult requests build on skills included in earlier ones. If you jump ahead and find yourself stuck, go back one or two. Be sure to read the comments in the answer script for some explanation. If you find that a different approach gets the same results, great! Just be sure you understand the PHP syntax the problem was designed to test.
The Web is full of excellent PHP tutorials. PHP exercises? Not so much, although more now than when this site first launched. This site helps to fill that gap with 31 exercises. Choose one from the menu on the left (or down below if you're on mobile), and get started!