Limiting the amount of characters in a string
<p>I'm using the following to limit the amount of characters in a string</p>

<pre><code>&lt;?php $eventtitle1 = get_the_title();
$eventtitle1_str = strip_tags($eventtitle1, '');
echo substr($eventtitle1_str,0,30) . "…"; ?&gt;
</code></pre>

<p>Is it possible to add the "..." if the string is more than 30 characters but not add it if it's less?</p>

<p><strong>e.g</strong></p>

<p>So it does this for a longer title:</p>

<p>"This is a longer ti..."</p>

<p>And it does this for a shorter title:</p>

<p>"This is a title"</p>

<p>(i.e not this - "This is a title ...")</p>
