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


its gives me legs;
why??

    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

        9 months later

        The solution is that never use capital letters or any kind in the script

        $imagename=$_FILE['userfile']['tmp_name'];

        always use userfile without caps...
        the problem only exist in php 5 .. if your using 4 then there is no problem

          Write a Reply...