Accessing Substrings: string substr ( string string, int start [, int length] )
<?php
$theclientstext = "this is a test. this is another test";
if (strlen ($theclientstext) >= 30){
echo substr ($theclientstext,0,29);
} else {
echo $theclientstext;
}
?>