php check if variable length equals a value
<p>Need to check if $message length is 7 characters or less, if so, do action A, if not, do action B. Is this correct syntax? I think im doing something wrong?</p>

<pre><code>&lt;?
if (strlen($message) &lt;= 7){
echo $actiona;
}
else
{
echo $actionb;
}
?&gt;
</code></pre>
