0

I have array like this :

$rincian7[$kode3][$kode4][$kode5][$idjudul][$idrincian]['trincian'] = $price;

I want to sum $price for every $kode3.

Is that possible?

1

1 Answer 1

1

Try this:

PHP

$p = 0;
foreach ($rincian7 as $o => $k){
    $p += $k[$kode4][$kode5][$idjudul][$idrincian]['trincian'];
}
echo $p;
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.