0

I have an array like below

Array
(
    [current_page] => 2
    [data] => Array
        (
            [0] => Array
                (
                    [id] => 6572565
                    [file_caption] => Halo 1
                    [status] => PENDING
                )

            [1] => Array
                (
                    [id] => 6572561
                    [file_caption] => Halo 2
                    [status] => DELIVERY
                )

        )
        
    [total] => 2
)

The question is, how do I get "STATUS" on ID: 6572561 ?

Thank you in advance.

M. Pancadewa
  • 145
  • 11
  • 1
    https://stackoverflow.com/questions/6661530/php-multidimensional-array-search-by-value should get you most of the way there – ADyson Sep 01 '21 at 19:31
  • 1
    Iterate over array and compare `id` key with required value. If match - return `status`. – u_mulder Sep 01 '21 at 19:32

0 Answers0