So once you've got your Javascript you should be able to work out which bits need to change to make it display what you want. Then write your PHP to do that.
It sounds like you will need to get a bit further in your project before you'll have a PHP problem to ask.