PHP ��U
前一頁 |  | 下一頁

# 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]] )

警告
�o�Ө�ƬO����ʽ��C�o�Ө�ƪ�欰�B�W�١B�M����ƪ����L���b��PHP�o�椤�i��|�b�q�p�U���ܡC �ϥΦ��ݦۦ�Ӿ᭷�I�C

## 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 the filtered data, or `FALSE` if the filter fails.

## �d��

範例 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"
    bool(false)

## �Ѧ�

input_get()
information about the callback type

前一頁 | 內容 | 下一頁
Filter Functions | 上一層 | input_filters_list