var_dump(isset($a['cake']['a']['b'])); 什么意思?该如何解决

WBOY
Release: 2016-06-13 11:41:36
Original
1101 people have browsed it

var_dump(isset($a['cake']['a']['b'])); 什么意思?
http://us1.php.net/manual/zh/function.isset.php

<?php<br /><br />$a = array ('test' => 1, 'hello' => NULL, 'pie' => array('a' => 'apple'));<br /><br />var_dump(isset($a['test']));            // TRUE<br />var_dump(isset($a['foo']));             // FALSE<br />var_dump(isset($a['hello']));           // FALSE<br /><br />// 键 'hello' 的值等于 NULL,所以被认为是未置值的。<br />// 如果想检测 NULL 键值,可以试试下边的方法。 <br />var_dump(array_key_exists('hello', $a)); // TRUE<br /><br />// Checking deeper array values<br />var_dump(isset($a['pie']['a']));        // TRUE <br />var_dump(isset($a['pie']['b']));        // FALSE<br />var_dump(isset($a['cake']['a']['b']));  // FALSE<br /><br />?> <br />
Copy after login

var_dump(isset($a['pie']['a']));   和var_dump(isset($a['cake']['a']['b']));是什么意思?请详细解释一下,我之前学过c语言,但是感觉php为什么如此难懂.. 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template