PHP: Hypertext Preprocessor (or simply PHP) is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP originally stood for Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.
PHP code may be embedded into HTML code, or it can be used in combination with various web template systems, web content management systems, and web frameworks. PHP code is usually processed by a PHP interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI) executable. The web server combines the results of the interpreted and executed PHP code, which may be any type of data, including images, with the generated web page. PHP code may also be executed with a command-line interface (CLI) and can be used to implement standalone graphical applications.
PHP’s if, if...else and while statements, are three of the building blocks that allow specified logic required for member functions to perform their tasks. Also, PHP’s assignment, increment and decrement operators. These additional operators abbreviate and simplify many program statements.
This section covers PHP’s remaining control statements. The control statements we study here (like those from section 2) will help build and manipulate objects. Here, the for, do...while and switch statements are demonstrated. Through short examples using while and for, counter-controlled repetition is explored. The break and continue program control statements are introduced. Logical operators, which enable the use of more powerful conditional expressions are explored.
In this section I begin writing programs that employ the basic concepts of object-oriented programming