Posted On: May 13, 2020
The list is similar to an array but it is not a function, instead, it is a language construct. This is used for the assignment of a list of variables in one operation. If you are using PHP 5 version, then the list values start from a rightmost parameter, and if you are using PHP 7 version, then your list starts with a left-most parameter. Code is like:
<?php $info = array('red', 'sign', 'danger'); // Listing all the variables list($color, $symbol, $fear) = $info; echo "$color is $symbol of $fear” ?>
Never Miss an Articles from us.
In PHP == is equal operator and returns TRUE if $a is equal to $b after type juggling and === is Identical operator and return TRUE if $a is equal to $b, and they are of the same data type...