I'm getting the arrays I want get the price accroding to the ID and the quantity. this is my array can you please help me how to do this in using array search function. Please help me slove this issue.
This is my array view
Here i'm paasing the dm_id , decoration_code, q1 accroding to this value i want to get the one of the p value (p mean price)
$dm_id = LL0007;
$decoration_code = LL0007C9;
$quantity = 50;
original result = p1 = 0.25
How can get this result when I use the arrary search?
array:3 [▼
0 => array:24 [▼
"dm_id" => "LL0007"
"decoration_code" => "LL0007B9"
"decoration_name" => "Undecorated"
"main_decoration" => "LL0007_LLNZ"
"setup_change" => "0"
"show_to_clients" => "1"
"q1" => "50"
"p1" => "0"
"q2" => "100"
"p2" => "0"
"q3" => "250"
"p3" => "0"
"q4" => "500"
"p4" => "0"
"q5" => "0"
"p5" => "0"
"q6" => "0"
"p6" => "0"
]
1 => array:24 [▼
"dm_id" => "LL0007"
"decoration_code" => "LL0007C9"
"decoration_name" => "1 Colour 1 Position Print"
"main_decoration" => "LL0007_LLNZ"
"setup_change" => "35"
"show_to_clients" => "1"
"q1" => "50"
"p1" => "0.25"
"q2" => "100"
"p2" => "0.25"
"q3" => "250"
"p3" => "0.25"
"q4" => "500"
"p4" => "0.25"
"q5" => "0"
"p5" => "0"
"q6" => "0"
"p6" => "0"
]
2 => array:24 [▼
"dm_id" => "LL0007"
"decoration_code" => "LL0007D9"
"decoration_name" => "1 Position Digital Print"
"main_decoration" => "LL0007_LLNZ"
"setup_change" => "35"
"show_to_clients" => "1"
"q1" => "50"
"p1" => "0.4"
"q2" => "100"
"p2" => "0.4"
"q3" => "250"
"p3" => "0.4"
"q4" => "500"
"p4" => "0.4"
"q5" => "0"
"p5" => "0"
"q6" => "0"
"p6" => "0"
]
]