PHP filter_list() Function
Definition and Usage
The filter_list() function returns a list of all the supported filter names.
Syntax
filter_list()
Technical Details
Return Value: | An array of all supported filter names, an empty array if there are no filter names |
---|---|
PHP Version: | 5.2+ |
More Examples
Example
Here, the filter_id() and the filter_list() functions are used to list the ID and filter name of all 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>
Try it Yourself »
❮ PHP Filter Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.