Skip to content

Commit

Permalink
README fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoren committed Mar 12, 2024
1 parent 8ea8800 commit 0a6b045
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ use Smoren\ArrayView\Selectors\MaskSelector;
use Smoren\ArrayView\Selectors\SliceSelector;
use Smoren\ArrayView\Views\ArrayView;

const $originalArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
$originalArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

const $subview = ArrayView::toView(originalArray)
$subview = ArrayView::toView(originalArray)
->subview('::2') // [1, 3, 5, 7, 9]
->subview(new MaskSelector([true, false, true, true, true])) // [1, 5, 7, 9]
->subview(new IndexListSelector([0, 1, 2])) // [1, 5, 7]
Expand Down

0 comments on commit 0a6b045

Please sign in to comment.