I have a problem on the PHP code as follows:
<?
class temp{
The code
class temp{ var $x; function temp(){ $this->x[1]="hello"; echo $this->x[1]; } }
$y=new temp();
?>
however the result is Array[1] not hello. What happen to my code?
Thanks
I used the code as is in my Windows installation and I get Hello. Nothing wrong with the code as far as I can see.