How do PHP based sites serve different versions of the site?
<p>If I had a site designed for desktop web usage, but I wanted to do create a version with a mobile-oriented design, how would I go about displaying this without maintaining two versions of the page with very similar logic behind them.</p>

<p>I can't just used different CSS for the mobile version as I plan to serve a different HTML structure, is there a better way than just using a lot of if statements in each page?</p>
