Tôi đang sử dụng API để lấy một số giá trị nhiệt độ và vị trí ở định dạng JSON. Tôi đang viết đầu ra bằng một văn bản đơn giản Cachefile.
Tuy nhiên, một trạm nhiệt độ có thể không báo cáo giá trị nhiệt độ và trong trường hợp đó, đầu ra của tôi sẽ là một dòng trống [\ n]. Tôi muốn xử lý trường hợp như vậy bằng cách hiển thị "N/A" cho trạm không báo cáo.
Dưới đây là một cachefile điển hình với nhiệt độ và vị trí báo cáo trạm đầu tiên, và trạm thứ hai tắt [báo cáo hai dòng trống]:
27.6
Napoli-Posillipo
[an empty line]
[an empty line]
Tôi đã thử với:
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
Tuy nhiên, tôi tiếp tục nhận được "N/A" cho cả hai trạm, ngay cả khi trạm đầu tiên báo cáo chính xác giá trị nhiệt độ của nó.
N/A ° C [Napoli-Posillipo] | N/A ° C [] | N/A ° C [AVG] | 12m21s trước
Tôi đã thử với fgets [] thay vì tệp [], nhưng tôi đã gặp lỗi:
Fgets [] mong đợi tham số 1 là tài nguyên, chuỗi được đưa ra trong [...] trên dòng 54
Tôi cũng đã thử sử dụng if [trống [$ nhiệt độ [foo]]] nhưng nó không hoạt động, vì tất nhiên \ n! = Trống.
Bất kỳ gợi ý? Cảm ơn trước
Làm thế nào kiểm tra mảng trống hoặc không trong PHP?
Sử dụng chức năng đếm: Hàm này đếm tất cả các phần tử trong một mảng. Nếu số lượng phần tử trong mảng bằng 0, thì nó sẽ hiển thị mảng trống. .... — Determine whether a variable is empty
Sử dụng hàm sizeof []: Phương pháp này kiểm tra kích thước của mảng. Nếu kích thước của mảng bằng 0 thì mảng trống nếu không thì mảng không trống ..
Làm thế nào để bạn kiểm tra xem một chuỗi không phải là null trong PHP?[mixed $var
]: bool
Hàm is_null [] kiểm tra xem một biến có null hay không. Hàm này trả về true [1] nếu biến là null, nếu không nó sẽ trả về sai/không có gì.
[Php 4, Php 5, Php 7, Php 8]trống - xác định xem một biến có trống không
Sự mô tảempty[] is essentially the concise equivalent to !isset[$var] || $var == false.
trống rỗng [hỗn hợp $var
]: bool
Thông sốtrue
if var
does not exist or has a value that is empty or
equal to zero, aka falsey, see conversion to boolean. Otherwise returns false
.
var
Biến cần được kiểm traempty[] / isset[] comparison.
Không có cảnh báo nào được tạo ra nếu biến không tồn tại. Điều đó có nghĩa là trống [] về cơ bản là tương đương ngắn gọn với! ISSET [$ var] || $ var == Sai.empty[] on String Offsets
Trả về giá trị
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]
Trả về true
Nếu var
không tồn tại hoặc có giá trị trống hoặc bằng 0, hay còn gọi là Fisey, xem chuyển đổi sang Boolean. Nếu không thì trả về false
.
Ví dụ: Because this is a language construct and not a function, it cannot be called using variable functions, or named arguments.
Ví dụ #1 Một so sánh đơn giản trống [] / isset [].:
Ví dụ #2 trống [] trên chuỗi offsetsempty[] on inaccessible object properties, the __isset[] overloading method will be called, if declared.
Ví dụ trên sẽ xuất ra:
- Ghi chú
- __isset[]
- Lưu ý: Bởi vì đây là một cấu trúc ngôn ngữ và không phải là một hàm, nó không thể được gọi là sử dụng các hàm biến hoặc các đối số được đặt tên.
- Ghi chú:
- Khi sử dụng trống [] trên các thuộc tính đối tượng không thể truy cập, phương thức quá tải __isset [] sẽ được gọi, nếu được khai báo.
- Xem thêm
- ISSET [] - Xác định xem một biến được khai báo và khác với NULL
unset [] - Und đặt một biến đã cho ¶
Array_Key_Exists [] - Kiểm tra xem khóa hoặc chỉ mục đã cho có tồn tại trong mảng
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
0$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
1$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
2$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
3Count [] - Đếm tất cả các phần tử trong một mảng hoặc trong một đối tượng có thể đếm được ¶
strlen [] - Nhận độ dài chuỗi
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
4$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
5$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
6$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Các bảng so sánh loại ¶
Nanhe Kumar ¶
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
8$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
9$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
78 năm trước ¶
Janci ¶
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]1
13 năm trước ¶
Steven tại Nevvix Dot Com ¶
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]2
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]3
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]4
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]5
11 năm trước ¶
Thông tin tại Ensostudio Dot Ru ¶
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]6
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]7
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]8
1 năm trước ¶
Markmanning tại Gmail Dot Com ¶
bool[true] bool[false] bool[false] bool[false] bool[true] bool[true]9
$var
0
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
73 năm trước ¶
anh em chấm của bạn dot t tại hotmail dot com
$var
2
$var
3
$var
4
$var
5
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
77 năm trước ¶
Array_Key_Exists [] - Kiểm tra xem khóa hoặc chỉ mục đã cho có tồn tại trong mảng
$var
7
$var
8
$var
9Count [] - Đếm tất cả các phần tử trong một mảng hoặc trong một đối tượng có thể đếm được ¶
5 năm trước
var
0
AdityCse tại Gmail Dot Com ¶ ¶
5 năm trước
var
1
AdityCse tại Gmail Dot Com ¶ ¶
Nanhe Kumar ¶
var
2
8 năm trước ¶
strlen [] - Nhận độ dài chuỗi
var
3
var
4
var
5
var
6Các bảng so sánh loại ¶
anh em chấm của bạn dot t tại hotmail dot com
var
7
var
8
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
77 năm trước ¶
Martin Dot Aarhof tại Gmail Dot Com ¶
true
0
10 năm trước ¶
Nanhe Kumar ¶
true
1
true
2
true
3
true
4
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
78 năm trước ¶
Martin Dot Aarhof tại Gmail Dot Com ¶
true
6
true
7
true
8
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
710 năm trước ¶
strlen [] - Nhận độ dài chuỗi
var
0
var
1
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Các bảng so sánh loại ¶
Martin Dot Aarhof tại Gmail Dot Com ¶
var
3
var
4
var
5
var
6
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
710 năm trước ¶
Ẩn danh ¶
var
8
var
9
false
0
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
714 năm trước ¶
6 năm trước
false
2
false
3
false
4
false
5
false
6
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Chrisdmiddleton tại Gmail Dot Com ¶ ¶
strlen [] - Nhận độ dài chuỗi
false
8
false
9
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Các bảng so sánh loại ¶
Nanhe Kumar ¶
1
2
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
78 năm trước ¶
Steven tại Nevvix Dot Com ¶
4
11 năm trước ¶
anh em chấm của bạn dot t tại hotmail dot com
5
6
7
8
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
77 năm trước ¶
15 năm trước
0
Martin Dot Aarhof tại Gmail Dot Com ¶ ¶
17 năm trước
1
2
3
4
5
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Rodolphe Dot Bodeau tại miễn phí dot fr ¶ ¶
11 năm trước
7
8
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Qeremy ¶ ¶
10 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
00$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
01$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7rkulla2 tại gmail dot com ¶
15 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
03$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
04$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
05$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
06$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
07$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
08$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Lukas ¶ ¶
5 tháng trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
10$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
2$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
12Gazettesdf ¶ ¶
4 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
13$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
14$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
15$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7Javier Alfonso ¶ ¶
6 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
17$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
18$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
19$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
20$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
21Xzero tại Elite7hackers Dot Net ¶
5 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
22$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
23$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
7AdityCse tại Gmail Dot Com ¶ ¶
4 năm trước
$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
25$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
26$display = file[$cachename];
$temperature[0] = $display[0];
$location[0] = $display[1];
$temperature[1] = $display[2];
$location[1] = $display[3];
$temp_avg = [[$temperature[0]+$temperature[1]]/2]; //average temperature
if[$temperature[0] = "\n"]{ //if weather station is not reporting data
$temperature[0] = "N/A";
$temp_avg = "N/A";
}
if[$temperature[1] = "\n"]{
$temperature[1] = "N/A";
$temp_avg = "N/A";
}
echo "".$temperature[0]."°C [".$location[0]."] | ";
echo "".$temperature[1]."°C [".$location[1]."] | ";
echo "".$temp_avg."°C [avg] | ".$minutes."m".$secondsleft."s ago";
27