Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Building a new site with PHP

Discussion in 'Programming' started by espmartin, Dec 8, 2007.

  1. espmartin

    espmartin New Member Webmaster

    Hello All,

    The more I use PHP, the more I realize I really want to use it more. You see,
    before I started using PHP, I would hard-code all elements such as navigation
    onto every page I have on a site. I'd make sure that the code was exactly
    the same, so when I needed to make a change or addition, I would do a
    search-and-replace on that site.

    But now with PHP, I just have one navigation php file, and link to it from my
    site's markup.

    How many of you designers use PHP in this fashion?

  2. SkinnerW

    SkinnerW New Member Webmaster

    There were other options to achieve similar tasks, DHTML for example. They work almost the same way as "php include" - you create dynamic template with all common elements and than just attach content pages to that template...

    PHP gives you much more flexibility than just simple "include" and I actually slow but sure converting all my html sites to php.
  3. espmartin

    espmartin New Member Webmaster

    I agree with you SkinnerW. I actually use PHP to serve one of my sites as
    XHTML 1.1 (with the correct content type as well):
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    and other "lesser" browsers get XHTML 1.0 Strict, with it's content type as:
    Just one semi-advanced PHP thang I do...

Featured Resources (View All)

Share This Page