21293 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 407 Views |
-
PHP error

22 July 2010 at 10:59pm
Hi
Can someone tells me what's wrong with this :
public function hasPress()
{
if ($this->PressRelease == '') then return false;
else return true;
}I'm getting an unexpected T_RETURN but I don't know what to correct all the ; seems to be in the right place
thanks
-
Re: PHP error

22 July 2010 at 11:04pm Last edited: 22 July 2010 11:19pm
This is pretty basic PHP...
if (...) { ... } else { ... }
Don't use 'then'On another note, you could just do the following
return ($this->PressRelease != '');
| 407 Views | ||
|
Page:
1
|
Go to Top |


