Returns the string $value, removing all but digits.
There are no additional options for Zend_Filter_Digits.
A basic example of usage is below:
1 2 3 | $filter = new Zend_Filter_Digits();
print $filter->filter('October 2009');
|
This returns “2009”.
1 2 3 | $filter = new Zend_Filter_Digits();
print $filter->filter('HTML 5 for Dummies');
|
This returns “5”.
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.