PHP and Class Variables

Pass a variable into a class through the __construct($variable) function

Variables set in the __Construct can be referenced throughout the class as $this->variable

Can be referenced outside the class as

Variable Can be passed into a class function like Class::function(variable);

You may also like...

Leave a Reply

Your email address will not be published.