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

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

b+ tree
Hi
can every body help me about b+ tree ?(insert & delete)

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

xml
<?php

echo "<h1>XML Articles</h1>";

$home

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of

Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

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