Ben bu dinamik dize var
"ZAN ROAD HOG HEADWRAPS The most popular ZAN headwrap style-features custom and original artwork"
EDIT How can I check all the capital words then if I encountered a ucwords() or title case word then I will automatically add a '--' after the last capital word? Note: The capital words are the product name and the first ucwords() or title case word is the start of the product description.
Ben şu anda bu kodu var ama şu anda çalışmıyor:
<?php
$str = preg_replace( '/\s+/', ' ', $sentence );
$words = array_reverse( explode( ' ', $str ) );
foreach ( $words as $k => $s ) {
if ( preg_match( '/\b[A-Z]{5,}\b/', $s ) ) {
$words[$k] = $s . " --";
break;
}
}
$short_desc = addslashes( trim( join( ' ', array_reverse( $words ) ) ));
?>
Şimdiden teşekkürler.