Ben iki dizi var.
Ilk dizinin örneği:
$arrayOne = array ( 'fruit' => array( 'apples' => array(), 'oranges' => array(), 'bananas' => array() ), 'vegetables' => array( 'tomatoes' => array(), 'carrots' => array(), 'celery' => array(), 'beets' => array ( 'bears' => array(), 'battlestar-galactica' => array() ), ), 'meat' => array(), 'other' => array() );
2.:
$arrayTwo = array ( 'frewt' => array( 'aplz' => array(), 'orangeez' => array(), 'bunanahs' => array() ), 'vetchteblz' => array( 'toem8ohs' => array(), 'careodds' => array(), 'sell-R-e' => array(), 'beats' => array ( 'bare z' => array(), 'tablestar-neglectia' => array() ), ), 'neat' => array(), 'mother' => array() );
İki diziler aynı "format" (vb boyutları aynı sayıda, anahtar sayısı, sipariş, vs) olduğunu fark, anahtarların sadece isimleri farklıdır. (Dizi anahtarları temelde tüm veri tutun.)
I have a few variables that address the keys of the first array ($arrayOne
). E.g. $one
would address the first dimension of the first array, so it's value (string) would be one out of 'fruit'
, 'vegetables'
, 'meat'
or 'other'
.
$two
would be 'apples'
or 'oranges'
or 'bananas'
or 'tomatoes'
or 'carrots'
, etc., you get the idea. (There's vars for each dimension)
As I said, those variables only address $arrayOne
. I want to be able to address the keys in the second array too, though. Meaning, by looking at the value of $one
I want to be able to get the array_key of both arrays.