- Featured Columnists
Table of Contents
- Web Basics
- Publishing on the Web: Putting Files on the Server
- Web Design Process and Workflow
- Project Management
- Mark My WWWord: HTML and XHTML
- Standards Compliance
- Meta Tags and Search
- Enhancing Web Page Interaction
- Web Graphics
- Web Page Optimization
- Overview of Servers
- Server Programming Basics
- Careers in Web Design
- Intellectual Property for Web Designers
Last updated Oct 17, 2003.
PHP is an acronym for PHP Hypertext Preprocessor. Though there have been arguments on its exact acronym, this is the one defined by the project Web site. PHP is an open source server-side scripting language that borrowed most of the syntax from C, with some C++, Java, and Perl added. Of course, it has its own features mixed in.
One of its strengths is its ability to be embedded within HTML, which is also its weakness because the code is for the Web and nothing else. Let's use the traditional "Hello, World!" example to see what PHP looks like:
<?php print "Hello, World!"; ?>
Both methods give the same results of displaying Hello, World! on the screen. In this example, it looks like PHP is more work, but not when it comes to adding interactive and dynamic features. With PHP, you can modify the "Hello, World!" line to use the visitor's name instead of "World" or to say, "Hello" in the person's language of choice. PHP files use the .php, .php4, or .phtml extension instead of .htm or .html.
PHP scripts can be anywhere within your domain and are natively supported by SQL Server, MySQL, Postgres SQL, Informatix, and Oracle databases. PHP is a structured language like C, Java, and Perl. Structured languages are said to be harder for newcomers to programming to learn. On the other hand, it's not based on object classes, which makes it easier to learn.