note 36519 added to function.array-keys
| From: | Conrad at rn2 dot php dot net | Date: | Mon, 13 Oct 2003 14:45:01 +0000 |
| Subject: | note 36519 added to function.array-keys | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-58537@lists.php.net to get a copy of this message | ||
I really needed to get just the key from the array from only knowing the contents, I dunno if anyone
else ever needed just the key but here is how I did it hopefully this will save someone the time I
spent :)
Function Get_Array_Key($MyArray,$MyString) {
list($lngKey) = Array_Keys($MyArray,$MyString);
Return $lngKey;
}
----
Manual Page -- http://www.php.net/manual/en/function.array-keys.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36519
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36519&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36519&report=yes
Search -- http://master.php.net/manage/user-notes.php