| @@ 426-430 (lines=5) @@ | ||
| 423 | } |
|
| 424 | if ($indexOfFirstTag !== null) { |
|
| 425 | $items = array(); |
|
| 426 | foreach ($words as $pos => $s) { |
|
| 427 | if ($pos >= 0 && $pos < $indexOfFirstTag) { |
|
| 428 | $items[] = $s; |
|
| 429 | } |
|
| 430 | } |
|
| 431 | if ($indexOfFirstTag > 0) { |
|
| 432 | array_splice( $words, 0, $indexOfFirstTag ); |
|
| 433 | } |
|
| @@ 438-442 (lines=5) @@ | ||
| 435 | return $items; |
|
| 436 | } else { |
|
| 437 | $items = array(); |
|
| 438 | foreach ($words as $pos => $s) { |
|
| 439 | if ( $pos >= 0 && $pos <= count( $words ) ) { |
|
| 440 | $items[] = $s; |
|
| 441 | } |
|
| 442 | } |
|
| 443 | array_splice( $words, 0, count( $words ) ); |
|
| 444 | ||
| 445 | return $items; |
|