01-05-2016, 02:00 PM
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:
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">© 1999-<?php echo date('Y'); ?>
David Powers</div