Example
The filter_list() function can be used to list the name and ID of all available filters:
<table>
<tr>
<td>Filter Name</td>
<td>Filter ID</td>
</tr>
<?php
foreach (filter_list()
as $id =>$filter) {
echo '<tr><td>' . $filter .
'</td><td>' . filter_id($filter) . '</td></tr>';
}
?>
</table>
Run example »
Definition and Usage
The filter_list() function returns a list of all supported filters.
Syntax
filter_list()
Technical Details
Return Value: | Returns an array of all supported filter names, or an empty array if there are no such filters |
---|---|
PHP Version: | 5.2.0+ |
< PHP Filter Reference