PHP fgetss() Function

The fgetss() function returns a line, with HTML and PHP tags removed, from an open file.The fgetss() function stops returning on a new line, at the specified length, or at EOF, whichever comes first.This function returns FALSE on failure.

string fgetss ( resource $handle [, int $length [, string $allowable_tags ]] )

Identical to fgets(), except that fgetss() attempts to strip any NUL bytes, HTML and PHP tags from the text it reads.

Example -

The above example will output something similar to:

ParameterDescription
fileRequired. Specifies the file to check
lengthOptional. Specifies the number of bytes to read. Default is 1024 bytes.
tagsOptional. Specifies tags that will not be removed