| @@ 629-633 (lines=5) @@ | ||
| 626 | } |
|
| 627 | if ($indexOfFirstTag !== null) { |
|
| 628 | $items = array(); |
|
| 629 | foreach ($words as $pos => $s) { |
|
| 630 | if ($pos >= 0 && $pos < $indexOfFirstTag) { |
|
| 631 | $items[] = $s; |
|
| 632 | } |
|
| 633 | } |
|
| 634 | if ($indexOfFirstTag > 0) { |
|
| 635 | array_splice( $words, 0, $indexOfFirstTag ); |
|
| 636 | } |
|
| @@ 641-645 (lines=5) @@ | ||
| 638 | return $items; |
|
| 639 | } else { |
|
| 640 | $items = array(); |
|
| 641 | foreach ($words as $pos => $s) { |
|
| 642 | if ( $pos >= 0 && $pos <= count( $words ) ) { |
|
| 643 | $items[] = $s; |
|
| 644 | } |
|
| 645 | } |
|
| 646 | array_splice( $words, 0, count( $words ) ); |
|
| 647 | ||
| 648 | return $items; |
|