finding key position of specified value in multi-dimensional array


Posted on 16th Feb 2014 07:03 pm by admin

Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{
$rc++;
$hold[$rc] = explode("|" , trim(fgets($openedfile)));
}
fclose($openedfile);
How can I loop through each $hold[$rc] and check if there is an $x_value in that particular array? Also- if there is an $x_value then need to know the what array in $hold has it?

So the loop through would tell me that $x_value is located in $hold[2] - for example. While it's exact position may be in $hold[2][4] - I do not need to know that.

Any help would be appreciated.
Melting.......

No comments posted yet

Your Answer:

Login to answer
302 Like 40 Dislike
Previous forums Next forums
Other forums

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Legal Issues for SAP ERP o ERP in general
Hi experts,

Can someone please help me finding some documentation about legal issues tha

Function module "DPS_CHECK_TABLE_EXISTS" not found (after OSS 1422843 impl)
Dear All,

I implemented Note OSS 1422843.

When i execute the new report RSPO20

Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....

Warning: session_start() [fu

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash