Using List in PHP to Access Array Values to Multi Dimensions

PHP

If you are looking to assign the values of an array to a group of variables with one statement, use list(). This construct is used to give a list of variables some value. They work only with arrays that use numeric indexes. Example: <?php $names = array (“Ashish”, “Michael”, “Chris”); list($name1, $name2, $name3) = $names; echo $name1; echo “<br />”;…

Comparison and Logical Operators in PHP

PHP

Operators in PHP are used for different tasks like comparing or incrementing/decreasing values. They are also used to test logical operations. There are many types of operators that you will be using in PHP. They can be grouped according to their usage. Two main types of operators are comparison and logical operators. These conditions usually come together with conditional statements…