Kôd:
<?php
class test {
function test() {
for ($i=0;$i<=9;$i++) {
$x[$i]=$i*$i; /* Nebitno */
}
}
function getarray() {
return $this->x;
}
} /* end test */
$test1 = new test;
$arr=$test1->getarray();
print_r $arr;
?>
i dobijam 'unexpected T_VARIABLE'
Nadam se da cete mi pomoci.