I have armed an array of this type:
$array =array('epc' => "$tag",);
When doing a print of $ array I get the following:
Array ([epc] => 1792) Array ([epc] = > 1792) Array ([epc] => 1212) Array ([epc] = > 1792) Array ([epc] = & gt ; 1792) Array ([epc] => 1212) Array ([epc] = > 1792) Array ([epc] => 1212) Array ([epc] = > 1792) Array ([epc] = & gt ; 1792) Array ([epc] = > 1792) Array ([epc] = > 1792) Array ([epc] = > 1792) Array ([epc] = > 1792) Array ([epc] = & gt ; 1212) Array ([epc] = > 1792) Array ([epc] = > 1792)
I am looking to obtain as a result only the different values without repeating that is: 1792 and 1212
I have tried using methods such as array_unique, serialize, foreach and I have not obtained results, I always see all the results.
The value I get from reading a text line of a TXT.
$linea = fgets($fp1);
$campo = explode(" ", $linea);
$tag = $campo[1];
$tag = str_replace('"','',$tag);
$tag =(string)(int)$tag;