<?php

$input_lines = "111
222
333
444
111
222";

$input_array = explode("\n", $input_lines);

// $input_lines = array("111","222","333","444","111","222");

$ouput = array_unique($input_array);

// var_dump($result);
foreach( $ouput as $item ){
 echo $item . "\n";
}

/**
OUTPUT:
111
222
333
444
222
**/
Related Keywords: Developer, How-to, Solved, Get Unique Values from Array Data