Try:

$string = preg_replace('/[^0-9]/','',$string);

Regards,
-Stig

Michael wrote:
> Hello all-
>
> I wish to strip all non-numeric characters and whitespace from a string.
>
> What is the best way to achieve this please?
>
> Michael
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to