I want to use foreach to showing orderIds in my output.
Here is my code :
$orders = $results['result']['data'];
foreach ($orders as $key => $order)
{
dd($order[$order]['orderId']);
}
here is $orders result :
1 => array:3 [
"orderId" => 4
"orderTotalPrice" => 100
}
"resId" => 1
]
2 => array:3 [
"orderId" => 18
"orderTotalPrice" => 100
}
"resId" => 1
]
3 => array:3 [
"orderId" => 34
"orderTotalPrice" => 100
}
"resId" => 1
]
4 => array:3 [
"orderId" => 64
"orderTotalPrice" => 100
}
"resId" => 1
]
Any suggestion?
}come from?