Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First you try to post your questions clearly.</p> <p>Your first array count is mismatched with other two arrays. So if the 3 arrays count must be equal, easily you can get the values. if you need to customize addition value, hard coded the array values and try addition.</p> <p>Method1: All the 3 arrays count is same. </p> <pre><code>&lt;?php $first = Array (0 =&gt; 0, 1 =&gt; 256, 2 =&gt; 512, 3 =&gt; 768, 4 =&gt; 1024, 5 =&gt; 1280, 6 =&gt; 1536, 7 =&gt; 1792, 8 =&gt; 2048, 9 =&gt; 2304, 10 =&gt; 2560, 11 =&gt; 2816, 12 =&gt; 3072, 13 =&gt; 3328, 14 =&gt; 3584, 15 =&gt; 3840, 16 =&gt; 4096, 17 =&gt; 4352, 18 =&gt; 4608, 19 =&gt; 4864, 20 =&gt; 5120, 21 =&gt; 5376, 22 =&gt; 5632, 23 =&gt; 5888 ); $second = Array (0 =&gt; 0, 1 =&gt; 65536, 2 =&gt; 131072, 3 =&gt; 196608, 4 =&gt; 262144, 5 =&gt; 327680, 6 =&gt; 393216, 7 =&gt; 458752, 8 =&gt; 524288, 9 =&gt; 589824, 10 =&gt; 655360, 11 =&gt; 720896, 12 =&gt; 786432, 13 =&gt; 851968, 14 =&gt; 917504, 15 =&gt; 983040, 16 =&gt; 1048576, 17 =&gt; 1114112, 18 =&gt; 1179648, 19 =&gt; 1245184, 20 =&gt; 1310720, 21 =&gt; 1376256, 22 =&gt; 1441792, 23 =&gt; 1507328); $third = Array (0 =&gt; 0, 1 =&gt; 1, 2 =&gt; 2, 3 =&gt; 3, 4 =&gt; 4, 5 =&gt; 5, 6 =&gt; 6, 7 =&gt; 7, 8 =&gt; 8, 9 =&gt; 9, 10 =&gt; 10, 11 =&gt; 11, 12 =&gt; 12, 13 =&gt; 13, 14 =&gt; 14, 15 =&gt; 15, 16 =&gt; 16, 17 =&gt; 17, 18 =&gt; 18, 19 =&gt; 19, 20 =&gt; 20, 21 =&gt; 21, 22 =&gt; 22, 23 =&gt; 23); $result = array(); foreach($first as $key =&gt; $values){ echo '&lt;br&gt;'.$values.'+'.$second[$key].'+'.$third[$key]; $result[] = $values+$second[$key]+$third[$key]; } print_r($result); ?&gt; </code></pre> <p>Method 2: (Please avoid this method)</p> <pre><code>$first_result = $first[0]+$second[7]+$third[0]; $second_result = $first[2]+$second[2]+$third[2]; $third_result = $first[1]+$second[1]+$third[1]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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