[PHP] trimming nans from a string

2002-12-11 Thread Frands Sørensen
I want a user to type a number in an html-form. Afterwards I want to check for wrong typing. How do I remove all non numbers from the string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trimming nans from a string

2002-12-11 Thread Leif K-Brooks
$variable = ereg_replace('[^0-9]','',$variable); Frands Sørensen wrote: I want a user to type a number in an html-form. Afterwards I want to check for wrong typing. How do I remove all non numbers from the string? -- The above message is encrypted with double rot13 encoding. Any