Hi,
I found the perfect solution for me. I added this function:
"function first_words($string, $num, $tail=' ...')
{
/** words into an array **/
$words = str_word_count($string, 2);
/*** get the first $num words ***/
$firstwords = array_slice( $words, 0, $num);
/** return words in a string **/
return implode(' ', $firstwords).$tail;
}
"
and made an echo like "echo first_words( $row->product_name, 2)"
This takes only the first two words (my product names itself allways contain two words) and kills the characteristics in the string.
Thank you,
kohypon