php: überprüfen ob input ne zahl ist

Seite 1 von 1 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/php_ueberpruefen_ob_input_ne_zahl_ist_134039/page_1 - zur Vollversion wechseln!


kleinerChemiker schrieb am 09.01.2005 um 18:06

wie überpfüfe ich am besten, ob ein input mittels get eine zahl ist?

tia

MIK


ica schrieb am 09.01.2005 um 18:16

http://www.php4-forum.de/allgemein.htm


dio schrieb am 09.01.2005 um 18:18

http://at.php.net/manual/en/function.is-numeric.php


kleinerChemiker schrieb am 09.01.2005 um 18:20

thx
is_numeric ist gut. ich habs mit is_int versucht, aber GET ist ja immer ein string :(


moidaschl schrieb am 10.01.2005 um 17:36

Zitat von kleinerChemiker
thx
is_numeric ist gut. ich habs mit is_int versucht, aber GET ist ja immer ein string :(


is_numeric('5')

is auch ein string und du bekommst true zurück ;)




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025