Basic PHP Template System

PHP has many different template solutions, and the beauty of them all is how simple it makes maintaining and changing your website. Back in the day when everything was handled with static HTML files – if you needed to add a new link to your main menu – you found yourself editing dozens if not […]

The PHP Ternary Operator

PHP has plenty of different operators, the majority of them being either unary or binary operators. A unary operator, such as !, performs its operations on just one single value. A binary operator, such as =, is used to perform an operation on two operads. So following the naming logic you’ve probably already figured out […]

Escaping Characters and Variable Expansion

Escaping characters is basic, but essential to an error-free PHP script. Consider the following sentence for example: Mike’s uncle said, “Isn’t that cool?” Now if we attempt to use PHP to echo this sentence to the browser, those quotes and apostrophes will cause some problems. The quotes and apostrophes inside the string are confused for […]

PHP Variables – Understanding The Basics

If you have ever looked through any programming language – or still remember those algebra classes when you learned what 3+x=5 means then you already know what a variable does. A variable stands for something else, or in PHP it stores something inside of it so that you can recall it later on in your […]