PHP – Pass by Reference or Pass by Value
Passing a variable by reference or by value to a function is a very useful concept for PHP programmers. Normally, when you are passing a variable to a functon, you are passing “by value” which meand the PHP procesor will make a duplicate variable to work on. When you pass a variable to a function [...]
Using The Ternary Operator Instead of “If” Statements
The ternary operator is available in PHP and most other programming languages and usually it causes much confusion for novice programmers because of it’s unusual syntax. If you are going to write, modify or debug code, the ternary operator is invaluable because it allows you to simplify more complex conditionals into one line statements.
The basic [...]