Var_dump (isset ($ a [cake] [a] [B]); what does it mean? Http://us1.php.net/manual/zh/function.isset.php
1, 'Hello' => NULL, 'pie' => array ('a' => 'apple ')); var_dump (isset ($ a ['test']); // TRUEvar_dump (isset ($ a ['foo']); // FALSEvar_dump (isset ($ a ['hello']); // FALSE // The value of the key 'hello' is NULL, so it is considered as an unset value. // If you want to check the NULL key value, try the following method. Var_dump (array_key_exists ('hello', $ a); // TRUE // Checking deeper array valuesvar_dump (isset ($ a ['pie'] ['A']); // TRUE var_dump (isset ($ a ['Pie '] [' B ']); // FALSEvar_dump (isset ($ a ['Cake'] ['A'] ['B']); // FALSE?>
Var_dump (isset ($ a ['Pie '] ['A']); and var_dump (isset ($ a ['Cake'] ['A'] ['B? I have learned C language before, but I think php is so hard to understand ..
Reply to discussion (solution)
Meaning of var_dump () printing,
Array () to create an array
Test => 1 test indicates that the key 1 of the array represents the value of the array, and so on.
$ A [test] is the value of the test key in the array.
The pie key value in this array is also an array, so $ a is a two-dimensional array.
$ A [pie] [a] is the apple value in the pie array in this array.
Isset is used to determine whether the value does not exist.
$ A ['Cake'] ['A'] ['B'] an element of the multi-dimensional join array
Although C does not have an associated key array, array elements such as a [1] [2] [3] are still very common, right?
Print the value of the multi-dimensional array.
Var_dump () printing
$ A ['Cake'] ['A'] ['B'] multi-dimensional array
Whether isset () is set
Checks whether the array is set. If the array has a corresponding key, true else false