filter_data

filter_data

(no version information, might be only in CVS)

filter_data -- Filters data with a specified filter

Description

mixed filter_data ( mixed variable, int filter [, mixed filter_options [, string charset]] )

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

Parameters

variable

Value to filter, arrays are filtered recursively.

filter

ID of a filter to use.

filter_options

Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array. For the "callback" filter, callback type should be passed.

charset

Character set used for filtering. Currently no filter uses this parameter.

Return Values

Returns filtered data or NULL if filter fails.

Examples

Example 1. A filter_data() example

<?php
var_dump
(filter_data('bob@example.com', FILTER_VALIDATE_EMAIL));
var_dump(filter_data('example.com', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED));
?>

The above example will output:

string(15) "bob@example.com"
NULL

See Also

input_get()
information about the callback type



Links
Bluefish $6.95/mo
  • 6GB Diskspace
  • 100GB Bandwidth
  • PHP Perl MySQL SSI CGI SSL
  • Free Domain
  • No Setup Fees
  • No Hidden Fees

Bluehost $6.95/mo
  • 50GB Diskspace
  • 999GB Bandwidth
  • Host 6 Domains
  • CGI Ruby(RoR) Perl PHP MySQL PostgreSQL
  • Support Custom PHP.INI
  • SSH SSL FTP Stats
  • Free Domain Forever
  • 27/7 Support

iPowerWeb $7.95/mo
  • 50GB Diskspace
  • 750GB Bandwidth
  • CGI Perl PHP SSI SSL MySQL
  • Free Domain Name



Partners


Quick Search
Platform

Price

Diskspace

Bandwidth


 Advance Search
 Show All Companies

Hosting Companies

Reference & Manual

Free Sitemap Generator Host Login/Register | Contact Us | Terms | Add Links
Thumbnails by Thumbshots.org © 2002-2012 CheapHostDir.com