public static function CSVToArray(String $file) : Array
    {
        $file = Base::suffix($file, '.csv');

        if( ! is_file($file) )
        {
            throw new Exception\FileNotFoundException(NULL, $file);
        }

        $row  = 1;
        $rows = [];

        if( ( $resource = fopen($file, "r") ) !== false )
        {
            while( ($data = fgetcsv($resource, 1000, ",")) !== false )
            {
                $num = count($data);

                $row++;
                
                for( $c = 0; $c < $num; $c++ )
                {
                    $rows[] = explode(';', $data[$c]);
                }
            }

            fclose($resource);
         }

         return $rows;
    }
public static function CSVToArray(String $file) : Array
    {
        $file = Base::suffix($file, '.csv');

        if( ! is_file($file) )
        {
            throw new Exception\FileNotFoundException(NULL, $file);
        }

        $row  = 1;
        $rows = [];

        if( ( $resource = fopen($file, "r") ) !== false )
        {
            while( ($data = fgetcsv($resource, 1000, ",")) !== false )
            {
                $num = count($data);

                $row++;
                
                for( $c = 0; $c < $num; $c++ )
                {
                    $rows[] = explode(';', $data[$c]);
                }
            }

            fclose($resource);
         }

         return $rows;
    }
public static function CSVToArray ( String $ file ) : Array { $ file = Base :: suffix ( $ file , '.csv' ) ; if ( ! is_file ( $ file ) ) { throw new Exception \ FileNotFoundException ( NULL , $ file ) ; } $ row = 1 ; $ rows = [ ] ; if ( ( $ resource = fopen ( $ file , "r" ) ) !== false ) { while ( ( $ data = fgetcsv ( $ resource , 1000 , "," ) ) !== false ) { $ num = count ( $ data ) ; $ row ++ ; for ( $ c = 0 ; $ c < $ num ; $ c ++ ) { $ rows [ ] = explode ( ';' , $ data [ $ c ] ) ; } } fclose ( $ resource ) ; } return $ rows ; }
CSV to Array

@param string $file

@return array
CSV to Array