I have a multidimensional array and would like to find an array by specific payment_status: My array below and I would like to return an array by payment_status.
[orders] => Array
(
[0] => Array
(
[total_price] => 995.94
[avg] => 995.940000
[count] => 1
[payment_status] => 1
)
[1] => Array
(
[total_price] => 779.64
[avg] => 779.640000
[count] => 1
[payment_status] => 2
)
[2] => Array
(
[total_price] => 1763.49
[avg] => 1763.490000
[count] => 1
[payment_status] => 3
)
function get_sub_array((int)$payment_status) {
}
How can I do this? Thanks!