ctype_digit() Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mmc01ms
Forum Commoner
Posts: 97
Joined: Wed Dec 01, 2004 3:33 am
Location: Nottingham, UK

ctype_digit() Question

Post by mmc01ms »

Hi guys im trying to validate a price field and the ctype_digit() function wont allow decimal values through. I've checked the php manual and none of the ctype functions check if the value is a decimal. Anyone know of another way i could do this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

cast to float.
Post Reply