Hi Andrew,
"Andrew Wilson" <[EMAIL PROTECTED]> wrote in message:
>
> Hay guys i was wondering if there was a form parameter of something
> equivalent for input text boxes that when a user enters a number or series
> of numbers that it removes the spaces.
> If there is no alternative how would you go about solving this issue.
Am I right in thinking that you want the form input variable to contain
numbers only? If so, you could simply do this:
$variable = preg_replace("![^0-9]!s", "", $variable);
Which would strip out everything that's not numbers.
OR, are you expecting strings like:
"Here's a number you can call for tech support: 12345 6789 - be patient,
they take *forever* to answer!"
If so, you could probably craft some regular expression up to remove the
spaces.
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php