| @@ 592-596 (lines=5) @@ | ||
| 589 | } |
|
| 590 | if ($indexOfFirstTag !== null) { |
|
| 591 | $items = array(); |
|
| 592 | foreach ($words as $pos => $s) { |
|
| 593 | if ($pos >= 0 && $pos < $indexOfFirstTag) { |
|
| 594 | $items[] = $s; |
|
| 595 | } |
|
| 596 | } |
|
| 597 | if ($indexOfFirstTag > 0) { |
|
| 598 | array_splice( $words, 0, $indexOfFirstTag ); |
|
| 599 | } |
|
| @@ 604-608 (lines=5) @@ | ||
| 601 | return $items; |
|
| 602 | } else { |
|
| 603 | $items = array(); |
|
| 604 | foreach ($words as $pos => $s) { |
|
| 605 | if ( $pos >= 0 && $pos <= count( $words ) ) { |
|
| 606 | $items[] = $s; |
|
| 607 | } |
|
| 608 | } |
|
| 609 | array_splice( $words, 0, count( $words ) ); |
|
| 610 | ||
| 611 | return $items; |
|