PHP code isn't necessary. You've asked a mysql question and been given a mysql answer without regard to the front end application (the two don't have to be used together in other words).
If you mean you'd like to use PHP to step through those results and point them to another page you can indeed do that.
Do you have phpmyadmin at all? If so you can run the query above and then click on the PHP button and it will generate necessary code.
If you don't have phpmyadmin then you can look at the mysql functions in the php manual and it will show you examples. look in the php manual under mysql_fetch_array for an example.