Q:

Outer Array Index

Array looks like below : 
  Array
    (
        [0] => Array
            (
                [memberid] => 5203
            )

        [1] => Array
            (
                [memberid] => 494
            )

        [2] => Array
            (
                [memberid] => 1053
            )

        [3] => Array
            (
                [memberid] => 1081
            )
    )

How can i find-out the outer array index (such as 0,1,2) using inner array.

A:

You can iterate the outer array, and save the key if the current inner array value matches like this:
$outerKey = null;
foreach($outerArray as $key => $member){
    if($member['memberid'] == 1081){
        $outerKey = $key;
        break;
    }
}
echo $outerKey; // it will print 3

