PHP This code giving me error
This Code Giviving me this error Please explain me what the problem is I am new to PHP and Object Oriented Programing . Please Provide me working code and please give response with explaination that what i have done wrong in this :-

THANK You in Advance!

    <?php
    class abc
    {
    $a="ankush";
    public function gettitle()
    {
    
    return $a;
    }
    };
    $obj= new abc();
    echo $obj->gettitle();
     
    ?>

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in C:\wamp\www\foo.php on line 4

PHP This code giving me error
===

This Code Giviving me this error Please explain me what the problem is I am new to PHP and Object Oriented Programing . Please Provide me working code and please give response with explaination that what i have done wrong in this :-

THANK You in Advance!

    <?php
    class abc
    {
    $a="ankush";
    public function gettitle()
    {
    
    return $a;
    }
    };
    $obj= new abc();
    echo $obj->gettitle();
     
    ?>

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in C:\wamp\www\foo.php on line 4
