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