<?php require dirname(__DIR__) . '/vendor/autoload.php';
global $ALVC;
$ALVC = new AloVoice\AloVoiceConnector();
$confs = $ALVC->getConfigs();
// var_dump($confs);

$cmpTash = __DIR__."/CompaniesTashkent.csv";

$row = 0;

$arCompHead = [];
$arCompanies = [];

if (($handle = fopen($cmpTash, "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1024, ";")) !== FALSE) {
        $num = count($data);
		if($row==0){
			foreach($data as $hd) {
				$arCompHead[] = $hd;
			}
		}
		else {
			$arComp = [];
			foreach($data as $k=>$dt) {
				$arComp[$arCompHead[$k]] = $dt;
			}
			$arCompanies[] = $arComp;
		}
		
        $row++;
		
		if($row>10){ break; }
    }
    fclose($handle);
}

var_dump($arCompanies);
?>