|
|
Zend Framework 2 Documentation (Manual) | |
|
File: /_sources/modules/zend.filter.digits.txt
Size: | 614 |
Storage flags: | no_autoload,compress/gzip (48%) |
.. _zend.filter.set.digits:
Digits
------
Returns the string ``$value``, removing all but digits.
.. _zend.filter.set.digits.options:
Supported Options
^^^^^^^^^^^^^^^^^
There are no additional options for ``Zend\Filter\Digits``.
.. _zend.filter.set.digits.basic:
Basic Usage
^^^^^^^^^^^
A basic example of usage is below:
.. code-block:: php
:linenos:
$filter = new Zend\Filter\Digits();
print $filter->filter('October 2012');
This returns "2012".
.. code-block:: php
:linenos:
$filter = new Zend\Filter\Digits();
print $filter->filter('HTML 5 for Dummies');
This returns "5".
For more information about the PHK package format: http://phk.tekwire.net