Welcome Guest, Not a member yet? Register   Sign In
array array_sum get error message
#2

Those aren't arrays, but objects inside an array.
So that would be:

PHP Code:
$sum 0;
foreach(
$data['data_user_income'] as $d) {
 
  $sum += $d->income_value;

Reply


Messages In This Thread
array array_sum get error message - by DELE - 02-16-2019, 12:01 PM
RE: array array_sum get error message - by jreklund - 02-16-2019, 12:46 PM
RE: array array_sum get error message - by DELE - 02-16-2019, 07:54 PM
RE: array array_sum get error message - by DELE - 02-17-2019, 04:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB