Array ( [6254] => Array ( [check] => on [quantity] => 2 [name] => Testing product_special One Size [total] => 15.9 [price] => 33.0000 [totalken] => 33075.9 ) [6255] => Array ( [quantity] => 1 [name] => Testing card [total] => 113.85 [price] => 33.0000 [totalken] => 16537.95 ) [6256] => Array ( [check] => on [quantity] => 1 [name] => Testing food [total] => 113.85 [price] => 33.0000 [totalken] => 16537.95 ) )
array_sum(array_column($value, 'price'))
using array_sum able to sum all the 'price' , but now with 1 condition:
IF in the array have "check" = on , only sum the price , if there is no "check" = on , ignore it