neo Posted June 15, 2005 Report Share Posted June 15, 2005 Kaa var paarbaudiit vai adresee ir padots vismaz viens $_GET[] mainiigais? Link to comment Share on other sites More sharing options...
bubu Posted June 15, 2005 Report Share Posted June 15, 2005 if (count($_GET)>0) { echo 'ir vismaz 1'; } Link to comment Share on other sites More sharing options...
neo Posted June 15, 2005 Author Report Share Posted June 15, 2005 (edited) paldies. tas dereeja. meeginaaju izvadiit visus $_GET mainiigos uz ekraana, bet laikam kaut ko ne esmu sarakstiijis pareizi jo nekas neizvadaas. $m=$_GET; for ($i=0;$i<count($m);$i++) { echo $m[$i]; } Edited June 15, 2005 by neo Link to comment Share on other sites More sharing options...
bubu Posted June 15, 2005 Report Share Posted June 15, 2005 Nu, protams, ka tā nevar. $_GET taču nesatur elementus ar skaitliskiem indeksiem, bet gan ar tekstuālus (nu tādus kā padod urlī). Vajag šitā: foreach($_GET as $key=>$value) { echo "$key=$value\n"; } Un ja gribi vienkārši debugošanas nolūkiem izmantot izvadīšanu browserī, tad raksti vienkārši print_r($_GET); Link to comment Share on other sites More sharing options...
Venom Posted June 16, 2005 Report Share Posted June 16, 2005 NB: if (count($_GET)>0) == if ($_GET) Link to comment Share on other sites More sharing options...
neo Posted June 16, 2005 Author Report Share Posted June 16, 2005 Paldies. Loti izsmeloshi. Link to comment Share on other sites More sharing options...
hmnc Posted June 16, 2005 Report Share Posted June 16, 2005 print_r($_GET); Link to comment Share on other sites More sharing options...
Recommended Posts