Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How PHP fits into web design
#1
The most common use for PHP is to provide dynamic content for standard web pages. It can be embedded directly in HTML or XHTML, and as long as the page is parsed by the PHP engine before being sent to the browser, the output of any PHP script will be rendered as a normal part of the web page.

To take a simple example, many websites include a copyright notice at the foot of each page. Instead of you needing to change the year manually every January, it can be done automatically by embedding the date() function you have been using in the examples so far. Simply insert it at the appropriate place in the page’s XHTML like this:


Quote:<div id="footer">&copy; 1999-<?php echo date('Y'); ?>

David Powers</div
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)