Here is a portion of my code:
function addItem($v, $l, $s = 0)
{
// put in array
$this->listArray["label"][$numItems] = $l;
$this->listArray["value"][$numItems] = $v;
if ($s != 0) $this->selected = $v;
}
This function puts the variables v and L into the member variable listArray
...
function getArray()
{
print $this->numItems;
print $this->listArray["label"][4];
for ($i = 0; $i < $this->numItems; $i++) {
print $this->listArray["label"][$i] . " = " . $this->listArray["value"][$i] . "<br>\n";
}
return $this->listArray;
}
This displays the array (for debuggin) and returns the array to the calling program.
I get the following output:
6 =
=
=
Any ideas as to what I am doing wrong? thanks