I am trying to do an if statement if a function returns true and the else if it doesn't
Basically i need to show a html class in the return 1. I have try that below but I got an error.
syntax error, unexpected 'if' (T_IF)
This is what I have tried
<div class="inner">
<div class="stat"
<?php $access->getAccess()
if (getAccess == 1) {
class="unpublished"
}
else {
}
?>
>
</div>
</div>
this is what the function looks like
public function getAccess()
{
return $this->access;
}
How can I do this right?