what does the . mean infront of the variable assignment php code example
Example 1: php & before variable
It passes a reference to the variable so when any variable assigned the reference
is edited, the original variable is changed. They are really useful when making
functions which update an existing variable. Instead of hard coding which variable
is updated, you can simply pass a reference to the function instead.
Example
<?php
$number = 3;
$pointer = &$number;
echo $number."<br/>";
$pointer = 24;
echo $number;
?>
Example 2: assign value php
reset($val['MemberSaveRoom'])['is_favour_room'] = true;
$val['MemberSaveRoom'][0]['is_favour_room'] = true;
MemberSaveRoom = array(
[0] = array(
'is_favour_room' => true,
));