PHP storing array column output from a function i call upon multiple times
<p>I am trying to merge two parts of a code. To do that i have to store the echo'd array column output from a function which i call on
multiple times into an array or arrays on which I can perform computations.</p>

<p>Here's what i'm trying to do:</p>

<pre><code>&lt;?php

$searchquery[1] ="jupiter";
$searchquery[2] ="venus";
//can be multiple queries

include ('find.php');

for($i=0;$i&lt;count($searchquery);$i++)
{
find($searchquery[$i]);
}

/find.php echoes back to me a MySQL query which then
 creates a 2 dimensional array for me called
/$searchresult which looks like this as an example
t x (let's call first column t for example, and second x)
|1|3|
|1|4|
|2|6|
|4|8|
|7|1|

and it echoes it back to me, this works.

But, i need to use the first column (t) (11247) output from find.php
which was the result of the searchquery "jupiter", 
and i need to store it as some sort of array in this  current sheet,
theni need to store the "venus" searchquery which is let's say

t x 
|1|3| 
|2|4|
|3|4|
|4|6|
|5|4|
</code></pre>

<p>and store the first column (t) as an array in this  current sheet.</p>

<p>I am trying to store the echos from the find.php function as arrays so that
i can perform the following operation in the current sheet:</p>

<pre><code>$venusarrayt = array(1, 1, 2, 4, 7); //the manually defined
 //$searchresult first column output from find.php which echos to me (t) (11247)
 $jupiterarrayt = array(1, 2, 3,4,5); //the manually defined 
 //$searchresult first column output from find.php which echos to me (t) (12345)

//I need to perform the following operation and sum all of the t combinations

for($l=0;$l&lt;count($venusarrayt);$l++){
for($s=0;$s&lt;count($jupiterarrayt);$s++){
echo $venusarrayt[$l]+$jupiterarrayt[$s];
</code></pre>

<p>This part works! But i am having trouble though merging the echo'd $searchresult output into an array on which i can perform the above
for loops. In this example i am doing it by hand by typing into the php sheet "venusarrayt and jupiterarrayt".</p>

<p>I am sure there is some way to store echo'd array column results from a function which i call upon multiple times into an array, but i 
haven't figured out yet how. Please help.</p>
