ok, here's very simply what i'm doing...
class device
{
var $devicesArray;
var $i;
var $name;
function device($name)
{
$name = $name;
}
function addDevice($_key, $_val)
{
print_r($this->devicesArray );
$this->devicesArray = array_merge($this->devicesArray, array($key => $val));
print_r($this->devicesArray );
echo "<br>";
}
}
then I have some other file that says:
$myDevice = new device("asdjlk");
$myDevice("ds1","ddddddd");
$myDevice("ds2","eeeee");
$myDevice("ds3","ffffffff");
when I run this in PHP 5, I get what I expect.. the array grows.
when I run it in PHP 4, I get
Array ( ) Array ( [0] => ddddddd)
Array ( ) Array ( [0] => eeeeeee )
Array ( ) Array ( [0] => fffffff)
what the heck am I doing wrong?