PHP is a hypertext preprocessor and general purpose scriptiong language designed for use within html source files.
My website has lists of my favorite books and movies each with links to the relevant movie or book online. My html source code for those pages use the following php macros:
<script language="php"> function book($title,$isbn) { echo "<a href=\"http://www.amazon.com/exec/obidos/ASIN/"; echo $isbn . "/\">" . $title . "</a>"; return 0; } function movie($title,$id) { echo "<a href=\"http://www.netflix.com/MovieDisplay?movieid="; echo $id . "\">" . $title . "</a>"; return 0; } </script>Here are examples of what my html source looks like by using the above two macros:
- <?php book("a Beautiful Mind","0743224574"); ?>
- <?php movie("Diva","447595"); ?>
And here is how they look like after being processed by php:
For more information about php, see www.php.net.