I have this code:
$feature_title = trim($array_item[0]);
$feature_value ="";
if(isset($array_item[1]))
{
$feature_value = trim($array_item[1]);
}
if($feature_title!="" && $feature_value!="" )
{
$t= $this->addProductFeature($product->id,$default_language_id, $feature_title , $feature_value);
}
Problem is that sometimes the $feature_value is too long. I would like to to limit the output to 200 chars and thought that "trim" would be enough but it is not.
Any ideas ?