i+= in php
<?php
$a = 3;
$a += 5; // sets $a to 8, as if we had said: $a = $a + 5;
$b = "Hello ";
$b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!";
?>
i+= in php
<?php
$a = 3;
$a += 5; // sets $a to 8, as if we had said: $a = $a + 5;
$b = "Hello ";
$b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!";
?>
php ??
// Example usage for: Null Coalesce Operator
$action = $_POST['action'] ?? 'default';
// The above is identical to this if/else statement
if (isset($_POST['action'])) {
$action = $_POST['action'];
} else {
$action = 'default';
}
php =>
PHP =>
//The double arrow operator, =>
//Used as an access mechanism for arrays.
//The left side will have a corresponding value on the right side in array.
//This can be used to set values into a corresponding index of an array.
//The index can be a string or number.
$myArray = array(
0 => 'Red',
1 => 'Orange',
2 => 'Yellow',
3 => 'Green'
);
php +=
$my_var = "foo";
$my_var .= " bar";
echo($my_var);
// foo bar
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us