[RESOLVED] it doesnt recognize OOP??

windows

Guest
<?php
class Cat{
var $legs=4;
}
$tiddles=new Cat();
echo $tiddles->legs;



its gives me legs;
why??No idea. Works for me.I would guess that either PHP is not running on your server, or the file is not recognized by the web server as a PHP file. If you do a "View Source" on the resulting ouput in your browser, do you see all the source code? (In other words, I suspect it's just getting the source code and treating everything between the "<" and the ">" as an invalid HTML tag.)well, i tried to start the server and finally it gave me 4
thnxx for trying to help
 
Back
Top