<?php
$myarr = ["one", "two", "three"];
$items_count = count($myarr);

if ($items_count < 2) {
    echo "nothing";
} elseif ($items_count >= 2 && $items_count <= 4) {
    echo implode(PHP_EOL, array_slice($myarr, 0, 2));
} else {
    echo implode(PHP_EOL, $myarr);
}