Note that there are some explanatory texts on larger screens.

plurals
  1. POArray sum of value by same key
    text
    copied!<pre><code>Array ( [0] =&gt; Array ( [SiteID] =&gt; 147 [Amount] =&gt; 500.00 [TransactionType] =&gt; Deposit ) [1] =&gt; Array ( [SiteID] =&gt; 147 [Amount] =&gt; 500.00 [TransactionType] =&gt; Redemption) [2] =&gt; Array ( [SiteID] =&gt; 147 [Amount] =&gt; 1500.00[TransactionType] =&gt; Deposit ) [3] =&gt; Array ( [SiteID] =&gt; 147 [Amount] =&gt; 200.00 [TransactionType] =&gt; Reload ) [4] =&gt; Array ( [SiteID] =&gt; 150 [Amount] =&gt; 100.00 [TransactionType] =&gt; Deposit ) [5] =&gt; Array ( [SiteID] =&gt; 3 [Amount] =&gt; 500.00 [TransactionType] =&gt; Redemption ) [6] =&gt; Array ( [SiteID] =&gt; 150 [Amount] =&gt; 200.00 [TransactionType] =&gt; Redemption ) [7] =&gt; Array ( [SiteID] =&gt; 3 [Amount] =&gt; 500.00 [TransactionType] =&gt; Deposit ) [8] =&gt; Array ( [SiteID] =&gt; 3 [Amount] =&gt; 200.00 [TransactionType] =&gt; Deposit ) [9] =&gt; Array ( [SiteID] =&gt; 3 [Amount] =&gt; 200.00 [TransactionType] =&gt; Reload ) [10] =&gt; Array ( [SiteID] =&gt;147 [Amount] =&gt; 500.00 [TransactionType] =&gt; Redemption )) ) </code></pre> <p>How to sum 'Amount' based on same 'SiteID' and 'TransactionType'. My data will shown like this:</p> <pre><code>array ([147]=&gt;array([Deposit] =&gt; "total amount", [Reload]=&gt; "total amount" [Redemption]=&gt; "total amount")) array ([150]=&gt;array([Deposit] =&gt; "total amount", [Reload]=&gt; "total amount" [Redemption]=&gt; "total amount")) array ([3]=&gt;array ([Deposit] =&gt; "total amount", [Reload]=&gt; "total amount" [Redemption]=&gt; "total amount")) </code></pre> <p>Thanks. Please Response. :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload