Voting

: max(six, three)?
(Example: nine)

The Note You're Voting On

andreasonny83 at gmail dot com
8 years ago
Here is an example with multiple parameters supplied

<?php
$var
= array();
$var['val1'] = 'test';
$var['val2'] = 'on';

if ( isset(
$var['val1'], $var['val2'] ) && $var['val2'] === 'on' ) {
unset(
$var['val1'] );
}
print_r( $var );
?>

This will output:
Array
(
[val2] => on
)

The following code does the same calling "isset" 2 times:

<?php
$var
= array();
$var['val1'] = 'test';
$var['val2'] = 'on';

if ( isset(
$var['val1'] ) && isset( $var['val2'] ) && $var['val2'] === 'on' ) {
unset(
$var['val1'] );
}
print_r( $var );
?>

<< Back to user notes page

To Top