The underlying problem is that the areas of your page that are hidden and revealed by clicking the menu items are not directly accessible by URL, nor do Back and Forward buttons allow moving between them.
It’s not caused by PHP. More javascript/jQuery scripting is needed to enable this, something like jQuery hashchange event. If you encounter difficulties with this, try the Javascript forum.