Jump to content

OOP help using this->


fantomel

Recommended Posts

hello guys i'm having some trouble around here with oop

 

i'm having a function where i have to pass one or two parameters

and i have like this

 

 

$this->_file = str_replace(.....);

on var_dump when i check to see what it outputs from str_replace it says NULL

but if i add before that line

$this->_classname = $_classname; 

works perfectly can someone explain to my why is doing like this? for each parameter that i pass i first need to do $this->_var = $var ?

Link to comment
https://forums.phpfreaks.com/topic/158598-oop-help-using-this/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.