Your IP : 216.73.217.78


Current Path : /home2/seto/scripts.anatollica.com/texts/
Upload File :
Current File : //home2/seto/scripts.anatollica.com/texts/keys.php

<?php
/**
 * Created by PhpStorm.
 * User: chumak
 * Date: 17.07.2019
 * Time: 21:36
 */


$csv = array_map('str_getcsv', file('string.csv'));
$start_key = '';

$all_arrays = array();
foreach ($csv as $csv_row) {

    $all_arrays[$csv_row[0]][] = $csv_row[0];
    $all_arrays[$csv_row[0]][] = $csv_row[1];
}
foreach ($all_arrays as $key=> $result) {
    $result = array_unique($result);
    $result = array_values($result);
    $i = 1;
    foreach ($result as $item) {
        if (count(array_unique($result)) == ($i)) {
            echo $item;
        } else {
            echo $item.'|';
        }
        $i++;
    }

    echo "<br>";
}
?>

<style>
    body {
        padding: 50px;
        font-family: Arial;
    }
</style>