Raised This Month: $ Target: $400
 0% 

retrieve a value from an array and find its position in that array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
moosewanted
Member
Join Date: May 2009
Old 05-31-2009 , 13:29   retrieve a value from an array and find its position in that array
Reply With Quote #1

Hey,
Probably really simple but I can't find any information.

I have a value which is stored in an array, but I want to find out it's position in the array and then use this new number.

Example:
PHP Code:
new g_Array[33]

public 
some_function(id)
{
    
g_Array[id] = 232
}

public 
some_other(array_value)
{
    
//I have the array value 232, but I want to find the id(position) in the array

Thanks for help
moosewanted is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode