In PHP I am trying to return TRUE if $counter is greater than 0. Would using a ternary operator work in this case. Here is the original code:
if($counter>0){return TRUE;}else{return FALSE;}
could I condense that down to
return $counter>0?TRUE:FALSE
Thanks
You could condense it to
return $counter>0Because that is a Boolean expression itself.