1
votes

I am getting the error the title and i dont know why. I am using eclipse. anyone know what it is?

<?php

class Movie {
    $title;
    $certificate;
    $director;
    $postedUrl;
}
?>
1

1 Answers

2
votes

You have to add a modifier like this (public, protected, private):

class Movie {
    public $title;
    public $certificate;
    public $director;
    public $postedUrl;
}

As a reference for PHP OOP see this site: http://php.net/manual/en/language.oop5.php