changing strings to float vars

From: Date: Mon, 15 Jan 2001 21:28:24 +0000
Subject: changing strings to float vars
Groups: php.general 
Request: Send a blank email to php-general+get-34681@lists.php.net to get a copy of this message
Sometimes clients put a dollar sign "$" in a form that only needs a number (like "1.50"). Is there a way to take a post variable and automatically convert it to a float value, stripping off any non-numeric characters? I tried doubleval() without success and I can't use intval() because it has decimals. kind regards, bill

« previous php.general (#34681) next »