Jump to content

Two Needles, 1 Haystack


duckstar

Recommended Posts

Hi There,

 

I was wondering if anyone is able to tell me how i can do this ?

Two needles and 1 haystack

 

I have tried http://www.phpfreaks.com/forums/index.php/topic,100952.msg399073.html#msg399073 to no avail

the $matches value just returns "Array"

 

Its pretty simple, i just need to search a multi dimensional array to find the index. 

But these need to be true

haystack[i][1] = needle1
haystack[i][2] = needle2

There will only be one record that both [1] = needle1 and [2] = needle 2

But obviously multiple records with just one being true.

 

Any help would be much appreciated  !

 

 

Link to comment
https://forums.phpfreaks.com/topic/195804-two-needles-1-haystack/
Share on other sites

Hmmm it contains the following...

array(3) { [0]=> array(18) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) [3]=> bool(false) [4]=> bool(false) [5]=> bool(false) [6]=> bool(false) [7]=> bool(false) [8]=> bool(false) [9]=> bool(false) [10]=> bool(false) [11]=> bool(false) [12]=> bool(false) [13]=> bool(false) [14]=> bool(false) [15]=> bool(false) [16]=> bool(false) [17]=> bool(false) } [1]=> array(18) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) [3]=> bool(false) [4]=> bool(false) [5]=> bool(false) [6]=> bool(false) [7]=> bool(false) [8]=> bool(false) [9]=> bool(false) [10]=> bool(false) [11]=> bool(false) [12]=> bool(false) [13]=> bool(false) [14]=> bool(false) [15]=> bool(false) [16]=> bool(false) [17]=> bool(false) } [2]=> array(18) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) [3]=> bool(false) [4]=> bool(false) [5]=> bool(false) [6]=> bool(false) [7]=> bool(false) [8]=> bool(false) [9]=> bool(false) [10]=> bool(false) [11]=> bool(false) [12]=> bool(false) [13]=> bool(false) [14]=> bool(false) [15]=> bool(false) [16]=> bool(false) [17]=> bool(false) } }

Not entirely sure what's going on there...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.