I get this error:
Fatal error: Call to undefined
function () in
/home/gmfeedsc/domains/cekdahl.com/public_html/virek/system/application/views/rekommendationer/visa.php
on line 263
And that row is:
<?php if ( ($post['users_id'] == $this->userId) || ($this->userLevel > 0) ): ?>
And I can’t figure it out. I guess it is because it thinking ( ) around the comparison is a function, but how else could I write this? thanks.
EDIT:
My script is a Codeigniter view, and the surrounding code is only XHTML. Since practice mandates that I shouldn’t retrieve variables by $this-> in the view, I made them variables instead and the code looks like this now:
<?php if ( ($post['users_id'] == $userId) || ($userLevel > 0) ): ?>
These statements work independently, the problem arises when I put them together.
There is nothing wrong with this code. However, try writing it like this:
If you are still having issues, try nested ifs to see if you get the same result: