Is there a concise way to check if a variable is set, and then echo it without repeating the same variable name?
Instead of this:
Use isset function of php like this:
variable) ? $this->variable : "variable not set"; ?>
i think this will help.