Возможно, я нашел ошибку, и если да, то кому я тоже сообщу об этом?
Вот что у меня получилось:
for ($i = 0; $i <= ($count)-1; ++$i) {
Lots of code...more then I want to put here
....
.....
.....
$mailto = $mailto . $i +1 . ") " . $name . " " . $location . " Type: " . $type . " Status: " . $geostatus . " Difficulty " .$difficulty . "\n" . $region . "\nHidden: " . $hidden . " Last Update: " . $lastupdate . " Last Found: " . $lastfound . "\nDistance: $distance Bearing: $bearing degrees $direction\n\n";
}
echo "$mailto \n";
Вывод будет выглядеть так:
4) Morrow Parking - RR Relic LMBT Lat: 39.35455 Lon: -84.133733 Type: Traditional Cache Status: Active Difficulty 3
City/State: Morrow, OH Warren Co.
Hidden: Wed June 09 2010 04:00 Last Update: Wed August 03 2011 17:43 Last Found: Wed December 31 1970 19:00
Distance: 4.31 Bearing: 212 degrees SW
Показывает мне только последний элемент в списке.Однако, если я немного изменю код на это:
for ($i = 0; $i <= ($count)-1; ++$i) {
Lots of code...more then I want to put here
....
.....
.....
$cc = $i +1;
$mailto = $mailto . $cc . ") " . $name . " " . $location . " Type: " . $type . " Status: " . $geostatus . " Difficulty " .$difficulty . "\n" . $region . "\nHidden: " . $hidden . " Last Update: " . $lastupdate . " Last Found: " . $lastfound . "\nDistance: $distance Bearing: $bearing degrees $direction\n\n";
}
echo "$mailto \n";
, я получу полный вывод, как я ожидаю увидеть:
1) Uranus - The Solar System - Lil Miami Bike Trail Lat: 39.415517 Lon: -84.103383 Type: Traditional Cache Status: Active Difficulty 1.5
City/State: , OH Warren Co.
Hidden: Sun October 17 2010 04:00 Last Update: Fri August 05 2011 18:25 Last Found: Wed December 31 1970 19:00
Distance: 0.92 Bearing: 309 degrees NW
2) 79 Lat: 39.394517 Lon: -84.096533 Type: Traditional Cache Status: Active Difficulty 2
City/State: , OH Warren Co.
Hidden: Sun May 30 2010 04:00 Last Update: Wed August 03 2011 17:42 Last Found: Wed December 31 1970 19:00
Distance: 0.93 Bearing: 201 degrees S
3) RR Relic - Oregonia Lat: 39.462583 Lon: -84.100383 Type: Traditional Cache Status: Active Difficulty 1.5
City/State: Oregonia, OH Warren Co.
Hidden: Sun May 02 2010 04:00 Last Update: Wed August 03 2011 17:41 Last Found: Wed December 31 1970 19:00
Distance: 3.88 Bearing: 351 degrees N
4) Morrow Parking - RR Relic LMBT Lat: 39.35455 Lon: -84.133733 Type: Traditional Cache Status: Active Difficulty 3
City/State: Morrow, OH Warren Co.
Hidden: Wed June 09 2010 04:00 Last Update: Wed August 03 2011 17:43 Last Found: Wed December 31 1970 19:00
Distance: 4.31 Bearing: 212 degrees SW
Нашел ли я ошибку или делаючто-то не так в 1-м способе и исправлено во 2-м?
И если я обнаружил ошибку, то кому я тоже сообщу об этом.10.10 Спасибо.