In a perfect world, maybe having everything handled on the client side would be ideal. Of course we don’t live in a perfect world so server-side scripting can be an effective means to an end. The link below is to a great resource on PHP in general & specifically detecting the user-agent, or browser being used to access your page. As mobile internet devices become more ubiquitous & the mobile web matures, there will be tremendous demand for contextually aware mobile-friendly content. Unfortunately, mobile browsers don’t universally conform to web standards & generally don’t support javascript by default, or not at all. Correctly rendered pages are the key to adoption of mobile surfing. In the not too distant future, mobile content delivery could directly influence the success & failure of traditional brick & mortar business. If you have the capability to find what you’re looking for from your mobile phone on the web & get directions or more at the same time, it’ll be an easy choice of where to do business.
PHP: Something Useful – Manual.