|
@@ 127-129 (lines=3) @@
|
| 124 |
|
$count = count(explode(' ', $sentences[0])); |
| 125 |
|
|
| 126 |
|
// if the first sentence is too long, show only the first $maxWords words |
| 127 |
|
if($count > $maxWords) { |
| 128 |
|
return implode( ' ', array_slice(explode( ' ', $sentences[0] ), 0, $maxWords)) . '...'; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
// add each sentence while there are enough words to do so |
| 132 |
|
$result = ''; |
|
@@ 168-170 (lines=3) @@
|
| 165 |
|
$count = count(explode(' ', $sentences[0])); |
| 166 |
|
|
| 167 |
|
// if the first sentence is too long, show only the first $maxWords words |
| 168 |
|
if($count > $maxWords) { |
| 169 |
|
return implode(' ', array_slice(explode( ' ', $sentences[0] ), 0, $maxWords)) . '...'; |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
// add each sentence while there are enough words to do so |
| 173 |
|
do { |