php finding parent array index or value
i need to find the floorname(eg:-ground)  and block name(eg:-B1) if  [linkclass] value is known..
is there any solution???

Array
(
    [0] => Array
        (
            [blockname] => B1
            [floor] => Array
                (
                    [0] => Array
                        (
                            [floorname] => ground
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 1A
                                            [name] => 1A
                                            [capacity] => 40
                                            [linkclass] => 0
                                        )

                                    [1] => Array
                                        (
                                            [id] => 1B
                                            [name] => 1B
                                            [capacity] => 40
                                            [linkclass] => 1
                                        )

                                    [2] => Array
                                        (
                                            [id] => 2A
                                            [name] => 2A
                                            [capacity] => 40
                                            [linkclass] => 2
                                        )

                                    [3] => Array
                                        (
                                            [id] => 2B
                                            [name] => 2B
                                            [capacity] => 45
                                            [linkclass] =>3
                                        )

                                )

                        )

                )

        )

    [1] => Array
        (
            [blockname] => B2
            [floor] => Array
                (
                    [0] => Array
                        (
                            [floorname] => ground
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 3A
                                            [name] => 3A
                                            [capacity] => 40
                                            [linkclass] =>4
                                        )

                                    [1] => Array
                                        (
                                            [id] => 3B
                                            [name] => 3B
                                            [capacity] => 50
                                            [linkclass] =>5
                                        )

                                )

                        )

                    [1] => Array
                        (
                            [floorname] => first
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 4A
                                            [name] => 4A
                                            [capacity] => 40
                                            [linkclass] =>6
                                        )

                                    [1] => Array
                                        (
                                            [id] => 4B
                                            [name] => 4B
                                            [capacity] => 50
                                            [linkclass] => 7
                                        )

                                )

                        )

                )

        )

)
php finding parent array index or value
===

i need to find the floorname(eg:-ground)  and block name(eg:-B1) if  [linkclass] value is known..
is there any solution???

Array
(
    [0] => Array
        (
            [blockname] => B1
            [floor] => Array
                (
                    [0] => Array
                        (
                            [floorname] => ground
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 1A
                                            [name] => 1A
                                            [capacity] => 40
                                            [linkclass] => 0
                                        )

                                    [1] => Array
                                        (
                                            [id] => 1B
                                            [name] => 1B
                                            [capacity] => 40
                                            [linkclass] => 1
                                        )

                                    [2] => Array
                                        (
                                            [id] => 2A
                                            [name] => 2A
                                            [capacity] => 40
                                            [linkclass] => 2
                                        )

                                    [3] => Array
                                        (
                                            [id] => 2B
                                            [name] => 2B
                                            [capacity] => 45
                                            [linkclass] =>3
                                        )

                                )

                        )

                )

        )

    [1] => Array
        (
            [blockname] => B2
            [floor] => Array
                (
                    [0] => Array
                        (
                            [floorname] => ground
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 3A
                                            [name] => 3A
                                            [capacity] => 40
                                            [linkclass] =>4
                                        )

                                    [1] => Array
                                        (
                                            [id] => 3B
                                            [name] => 3B
                                            [capacity] => 50
                                            [linkclass] =>5
                                        )

                                )

                        )

                    [1] => Array
                        (
                            [floorname] => first
                            [rooms] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 4A
                                            [name] => 4A
                                            [capacity] => 40
                                            [linkclass] =>6
                                        )

                                    [1] => Array
                                        (
                                            [id] => 4B
                                            [name] => 4B
                                            [capacity] => 50
                                            [linkclass] => 7
                                        )

                                )

                        )

                )

        )

)