Var_dump (isset ($a [' Cake '] [' a '] [' B ']); What do you mean?
http://us1.php.net/manual/zh/function.isset.php
$a = array (' test ' = = 1, ' hello ' = NULL, ' pie ' = = Array (' a ' = ' = ' apple '));
Var_dump (isset ($a [' Test ']); TRUE
Var_dump (isset ($a [' foo ']); FALSE
Var_dump (isset ($a [' hello ']); FALSE
The value of the key ' hello ' is equal to NULL, so it is considered to be an unassigned value.
Var_dump (array_key_exists (' hello ', $a)); TRUE
Checking Deeper Array values
Var_dump (isset ($a [' Pie '] [' a ']);
Var_dump (isset ($a [' Pie '] [' B ']); FALSE
Var_dump (isset ($a [' Cake '] [' a '] [' B ']); FALSE
Var_dump (isset ($a [' Pie '] [' a ']); and Var_dump (the isset ($a [' Cake '] [' a '] [' B ']); Please explain in detail, I have learned C language before, but I feel PHP is so difficult to understand.
Share to: more
------Solution--------------------
Var_dump () printed meaning,
Array () to create a
The test=>1 test indicates that the array's key 1 represents the value of the array, followed by the
$a [test] is the value of the test key inside the array.
The value of a pie key in this array is also an array so $a is a two-dimensional array.
$a [Pie][a] is to take the Apple value inside the pie array inside this array.
Isset is the idea that there is no such value.
------Solution--------------------
$a [' Cake '] [' a '] [' B '] an element of a multidimensional associative array
Although there is no associative key array in C, array elements such as a[1][2][3] are common.
------Solution--------------------
Prints the value of a multidimensional array setting.
Var_dump () Print
$a [' Cake '] [' a '] [' B '] multidimensional array
Isset () sets the value
------Solution--------------------
Determines whether the array is set if there is a corresponding key in the array true else false