In PHP, there are 3 ways to delete an element from an array.
Using unset Function
The unset(mixed $var, mixed ...$vars): void function destroys the specified variables. For example,
$arr = ["a", "b", "d"];
unset($arr[1]);
print_r($arr);
Arr...
Reverse the order of an array.Using array_reverse Function
The array_reverse() return an array with elements in reverse order.
$arr = array("PHP", 8.1, 4);
$reversed = array_reverse($arr);
print_r($reversed);
$preserved = array_reverse($arr, true);...
Printing all properties of an object.
Using print_r Function
The print_r() prints human-readable information about a variable. If given a string, int or float, the value itself will be printed. If given an array, values will be presented in a format...