I am having some trouble with arrays. I do not think my arrays are initializing. I an getting zero for sumx. Could someone take a look?
PHP Code:class class1 {
function SUM(){
$this->x = array(0,1,2,3,4,5,6);
for ($this->k = 0; $this->k <= 6; $this->k++){
$this->sumx += $this->x[k];
}
}
}



Reply With Quote




Bookmarks