4.11. Checking if a Key Is in an Array4.11.2. Solutionif (isset($array['key'])) { /* there is a value for 'key' in $array */ } 4.11.3. DiscussionYou can check the definedness of an array element just as you'd for any other variable. See the Introduction to Chapter 5 for more information about the truth value of variables. 4.11.4. See AlsoDocumentation on isset( ) at http://www.php.net/isset. Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|