php-general | 2001072
Date: 07/31/01
- Next message: Brian White: "Re: [PHP] Java Jock - 1st line syntax"
- Previous message: Ben Bleything: "RE: [PHP] Visual Login"
- In reply to: Jaxon: "[PHP] in_array() with associate array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
in_array is for testing that a value exists in an array. What you want is
if ( isset( $some_array[some_key] ) )
print "HAS KEY";
else
print "DOESN'T HAVE KEY";
At 14:23 31/07/2001 -0400, Jaxon wrote:
>hi,
>
>in_array is confusing me :)
>
>can someone show me an example of how to test if
>
>$some_array[some_key]
>
>actually has a value, without outputting the value?
>
>tia,
>jaxon
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe <email protected>
>For additional commands, e-mail: php-general-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web: http://www.steptwo.com.au/
Email: bwhite <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Brian White: "Re: [PHP] Java Jock - 1st line syntax"
- Previous message: Ben Bleything: "RE: [PHP] Visual Login"
- In reply to: Jaxon: "[PHP] in_array() with associate array?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

