26383Classes and OOP in PHPhttp://www.chauy.com/2006/01/php-classes-and-object-orientated-programming-oop/Object orientated programming (OOP) is a commonly used term when discussing modern programming techniques. One of the things that makes humans stand out is the ability to categorise - we put objects into categories of similar type of function. For example, we have the category vechicle. Within this category, you have the different types of vehicle - car, bug, train, van. In the same bag, a llama is a type of animal. This analogy applies to programming - we create functions to do specific tasks and then group similar functions into classes. No only does this organise everything, but also allows a common access point for these similar functions.PHP > Tips and Tutorials > Introduction to PHPOct 15, 2006dotcomguy
In the most basic sense, a class is a group of related functions. Think of them as parts of a factory: even though they do different things, they usually work together to create a common result.
PHP (Hypertext Pre-Processor) is a scripting language. One common mistake made by beginners to programming is to confuse PHP and HTML. HTML is the code which a browser interprets, while PHP is the code which creates HTML. PHP can create HTML. If you do not know basic HTML, then do not read any further.
To identify PHP code you must give the file a .php extension. This tells the web server to send these files to the PHP engine, so that they can be interpreted/compiled. Beyond giving them a .php extension you must also identify PHP code by surrounding it in the following tags:
Functions are similar to variables in the sense that they hold information within them and can be executed once or unlimited times by a PHP script. PHP has many functions already created with a specific job or function a pre installed function we have alreay worked with in this tutorial is echo(). You can create your own function too.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.