PHP3 Manual
PrevNext

htmlspecialchars

htmlspecialchars -- Convert special characters to HTML entities.

Description

string htmlspecialchars(string string);

Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with these conversions made.

At present, the translations that are done are:

Note that this functions does not translate anything beyond what is listed above. For full entity translation, see htmlentities().

See also htmlentities() and nl2br().


PrevHomeNext
flushUphtmlentities