Can someone please tell me how to make all the values actually appear from this? All I get is the $retArray[invNum] variable. I assume the array is being overwritten. (The first one is not the complete function, but enough to show you what I'm trying to do.)
Thanks in advance,
Tommy
function blah($cust) {
$retArray = $this->loadCustInfo($cust);
$retArray = $this->loadCustSites($cust);
$retArray = $this->loadNewInvoiceNum();
return $retArray;
}
function loadCustInfo ($cust) {
global $db_aocscust,$db_aocsemp;
$db_aocscust->connect("blah");
$QUERY = mysql_query("blah");
list($retArray[name],$retArray[company],$retArray[address],$retArray[city],$retArray[state],$retArray[zip],$retArray[email]) = mysql_fetch_row($QUERY);
return $retArray;
}
function loadCustSites ($cust) {
global $db_aocscust,$db_aocsemp;
$db_aocscust->connect("blah");
$QUERY = mysql_query("blah");
$NUMROWS = mysql_num_rows($QUERY);
for ($I=0; $I<$NUMROWS; $I++) {
list($retArray[site][]) = mysql_fetch_row($QUERY);
}
$retArray[numSites] = count($retArray[site]);
return $retArray;
}
function loadNewInvoiceNum() {
global $db_aocscust,$db_aocsemp;
$db_aocscust->connect("blah");
$QUERY = mysql_query("blah");
list($retArray[invNum]) = mysql_fetch_row($QUERY);
$retArray[invNum] += 1;
return $retArray;
}
P.S. I've already tried using .= and changing the $retArray to $retArray2 in the sub-functions. Thanks again.