Marc Reichelt: Standard-Wert

Beitrag lesen

Hallo Richie,

wie soll ich anfang einen standard wert gebn??

So etwa vielleicht?

<?php  
  
if(!isset($_GET['anfang']))  
{  
  $anfang = 0;                    // Standard-Wert  
} else  
{  
  $anfang = $_GET['anfang'];  
}  
  
?>

Natürlich fehlen hier noch jegliche Überprüfungen darauf, ob die Variable überhaupt gültige Werte enthält.

Grüße

Marc Reichelt || http://www.marcreichelt.de/

--
Linux is like a wigwam - no windows, no gates and an Apache inside!
Selfcode: ie:{ fl:| br:> va:} ls:< fo:} rl:( n4:( ss:) de:> js:| ch:? sh:| mo:) zu:)
http://emmanuel.dammerer.at/selfcode.html