function loadStandsData()
        {
            $array = $fields = array();
            $i = 0;
            $handle = @fopen($this->airportStandsFile, "r");
            if ($handle) {
                while (($row = fgetcsv($handle, 4096)) !== false) {
                    if (empty($fields)) {
                        $fields = $row;
                        continue;
                    }
                    $y = 0;
                    foreach ($row as $k => $value) {
                        if ($y == 1) { // Convert LAT coordinate
                            $array[$row[0]][$fields[$k]] = $this->convertCAALatCoord($value);
                        } else if ($y == 2) { // Convert LONG coordinate
                            $array[$row[0]][$fields[$k]] = $this->convertCAALongCoord($value);
                        } else {
                            $array[$row[0]][$fields[$k]] = $value;
                        }
                        $y++;
                    }
                    $i++;
                }
                if (!feof($handle)) {
                    echo "Error: unexpected fgets() fail\n";
                    return false;
                }
                fclose($handle);
            } else {
                return false;
            }
            $this->stands = $array;
            return true;
        }
function loadStandsData()
        {
            $array = $fields = array();
            $i = 0;
            $handle = @fopen($this->airportStandsFile, "r");
            if ($handle) {
                while (($row = fgetcsv($handle, 4096)) !== false) {
                    if (empty($fields)) {
                        $fields = $row;
                        continue;
                    }
                    $y = 0;
                    foreach ($row as $k => $value) {
                        if ($y == 1) { // Convert LAT coordinate
                            $array[$row[0]][$fields[$k]] = $this->convertCAALatCoord($value);
                        } else if ($y == 2) { // Convert LONG coordinate
                            $array[$row[0]][$fields[$k]] = $this->convertCAALongCoord($value);
                        } else {
                            $array[$row[0]][$fields[$k]] = $value;
                        }
                        $y++;
                    }
                    $i++;
                }
                if (!feof($handle)) {
                    echo "Error: unexpected fgets() fail\n";
                    return false;
                }
                fclose($handle);
            } else {
                return false;
            }
            $this->stands = $array;
            return true;
        }
function loadStandsData ( ) { $ array = $ fields = array ( ) ; $ i = 0 ; $ handle = @ fopen ( $ this -> airportStandsFile , "r" ) ; if ( $ handle ) { while ( ( $ row = fgetcsv ( $ handle , 4096 ) ) !== false ) { if ( empty ( $ fields ) ) { $ fields = $ row ; continue ; } $ y = 0 ; foreach ( $ row as $ k => $ value ) { if ( $ y == 1 ) { // Convert LAT coordinate $ array [ $ row [ 0 ] ] [ $ fields [ $ k ] ] = $ this -> convertCAALatCoord ( $ value ) ; } else if ( $ y == 2 ) { // Convert LONG coordinate $ array [ $ row [ 0 ] ] [ $ fields [ $ k ] ] = $ this -> convertCAALongCoord ( $ value ) ; } else { $ array [ $ row [ 0 ] ] [ $ fields [ $ k ] ] = $ value ; } $ y ++ ; } $ i ++ ; } if ( ! feof ( $ handle ) ) { echo "Error: unexpected fgets() fail\n" ; return false ; } fclose ( $ handle ) ; } else { return false ; } $ this -> stands = $ array ; return true ; }
Load the stand data
Load the stand data