Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Multidimentional Arrays in PHP


ghost's Avatar
0 0

I have been working with multidimentional arrays for a couple of days and am wondering whether it is possible to do what I am trying to do.

What I want to do is see whether I can create a line through the array and compare it to the array ie

$fruit = array( "apples" => array( "english" => array ( "grannysmith", "cox", "marks"), "american" => array ("tom", "dick", "harry"), "french" => array ("blah") ) "bananas" => array( "carribean" ) )

I then what to compare it to a string such as

apples-french-blah (Which would return true) or bananas-french-tom (Which would return false)

Is this possible?

Thanks

mozzer