Hi Michael,
> I wish to strip all non-numeric characters and whitespace from a
> string.
>
> What is the best way to achieve this please?
$string = preg_replace('/[^\d]/', null, $string);
Hope that helps.
Kind regards,
James McGlinn
__________________________________
CTO
Eventfinder Limited
Suite 106, Heards Building
2 Ruskin Street, Parnell, Auckland 1052
Phone: +649 365 2342
Mobile: +6421 633 234
[EMAIL PROTECTED] | www.eventfinder.co.nz
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---