![]() |
if in
I can do this in python:
if "asdf" in list: do stuff Can I do something like that to an associative array in PHP? |
You can use the in_array() to see if the value exists, and if you're looking for a key then you could probably combine that with array_keys()
|
Thanks Jimbo! But there's no generic if in like thing?
|
you might want to look at switches. see this link for more information.
|
Quote:
|
| All times are GMT -5. The time now is 1:37 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC