multidimensional array convert inner array [closed]

  arrays, php

NOW:

  Array
(
    [0] => Array
        (
            [id] => Array
                (
                    [0] => 2
                )

            [expenses] => CONVEYANCE
            [amount] => 1150
            [account_year] => 2020-21
        )

    [1] => Array
        (
            [id] => Array
                (
                    [0] => 2
                )

            [expenses] => EASYLINK
            [amount] => 250
            [account_year] => 2020-21
        )

)

WANT THIS

  Array
(
    [0] => Array
        (
            [id] => 2
            [expenses] => CONVEYANCE
            [amount] => 1150
            [account_year] => 2020-21
        )

    [1] => Array
        (
            [id] => 2
            [expenses] => EASYLINK
            [amount] => 250
            [account_year] => 2020-21
        )

)

Source: Ask PHP

LEAVE A COMMENT