cross: Wieso "Undefined variable vTagOptions"?

Beitrag lesen

Hallo Forum,

als ziemlicher Anfänger verstehe ich die o.a. Notice von PHP nicht:

  
 for($i=1; $i<32; $i++) {  
  $vTagOptions .= "  <option>".$i."</option>\n";  
 }  
 for($i=1; $i<32; $i++) {  
  $bTagOptions .= $i == $tag ? "  <option selected=\"selected\">".$i."</option>\n" : "  <option>".$i."</option>\n";  
 }  
 for($i=1; $i<13; $i++) {  
  $monOptions .= $i == $mon ? "  <option selected=\"selected\">".$i."</option>\n" : "  <option>".$i."</option>\n";  
 }  
 for($i=2007; $i<2011; $i++) {  
  $jahrOptions .= $i == $jahr ? "  <option selected=\"selected\">".$i."</option>\n" : "  <option>".$i."</option>\n";  
 }  

Die Variablen $bTagOptions, $monOptions und $jahrOptions werden ebenfalls angemeckert.

Für mich sind die Variablen keineswegs undefiniert, sondern es steht doch was drin, nämlich jeweils ein Option-Tag.

Wäre nett, wenn mir das mal jemand verständlich erklären könnte. Google gibt dazu zig 1000 Seiten raus mit Beispielen für undefinierte Variablen, jedoch verstehe ich nicht, WAS genau ich falsch mache.

Vielen Dank im voraus
Gruß
cross