". $sql. "
"); $Ct = pg_num_rows($res); for($iCount = 0; $iCount < $Ct; $iCount++) { $row = pg_fetch_array($res, $iCount); $lat[$iCount] = $row["lat"]; $lon[$iCount] = $row["lon"]; $w_status[$iCount] = $row["work_status"]; $t_name[$iCount] = $row["terminal_name"]; } $lat_php = join(",", $lat); $lon_php = join(",", $lon); $w_status_php = join(",", $w_status); $t_name_php = join(",", $t_name); ?>