| @@ 598-602 (lines=5) @@ | ||
| 595 | } |
|
| 596 | if ($indexOfFirstTag !== null) { |
|
| 597 | $items = array(); |
|
| 598 | foreach ($words as $pos => $s) { |
|
| 599 | if ($pos >= 0 && $pos < $indexOfFirstTag) { |
|
| 600 | $items[] = $s; |
|
| 601 | } |
|
| 602 | } |
|
| 603 | if ($indexOfFirstTag > 0) { |
|
| 604 | array_splice( $words, 0, $indexOfFirstTag ); |
|
| 605 | } |
|
| @@ 610-614 (lines=5) @@ | ||
| 607 | return $items; |
|
| 608 | } else { |
|
| 609 | $items = array(); |
|
| 610 | foreach ($words as $pos => $s) { |
|
| 611 | if ( $pos >= 0 && $pos <= count( $words ) ) { |
|
| 612 | $items[] = $s; |
|
| 613 | } |
|
| 614 | } |
|
| 615 | array_splice( $words, 0, count( $words ) ); |
|
| 616 | ||
| 617 | return $items; |
|