Skip to content

Tag: arrays

PHP Group array by date

I have the following array that gathers data from purchases, visits and coupons generated in my application: array:10 [ 0 => array:2 [ “dt” => “2020-11-18” “cupoms” => 9 ] 1 => array:2 [ “dt” => “2020-11-19” “cupoms” => …

PHP Recursively calculate a formula in an array in reverse

I would like te perform a calculation on the following array eventually the calculation would traverse into: I’ve tried recursively looping through the array using array_walk_recursive and custom functions which basically to the same. but the problem is that the add cannot calculate the ceil before it h…

Array, array, and objects [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I got this result in my variable What I need is all in a single array, is that possible? Some…