nl2br
�������� ������� �������� ������.
��������� :
string nl2br(string string)
�������� � ������ ��� ������� ����� ������ \n �� <br>\n � ���������� ���������. �������� ������ �� ����������. �������� �������� �� ��, ��� ������� \r, ������� ������������ � ����� ������ ��������� ������ Windows, ���� �������� ����� �� �����������, � ������ �������� �� ������ �����.
�������� ������� �������� ������.
��������� :
string nl2br(string string)
�������� � ������ ��� ������� ����� ������ \n �� <br>\n � ���������� ���������. �������� ������ �� ����������. �������� �������� �� ��, ��� ������� \r, ������� ������������ � ����� ������ ��������� ������ Windows, ���� �������� ����� �� �����������, � ������ �������� �� ������ �����.
strip_tags
������� �� ������ ����.
��������� :
string strip_tags(string str [, string allowable_tags])
��� ������� ������� �� ������ ��� HTML- � PHP-���� � ���������� ���������.
������������� ��� ��������� ���� �������� ������.
� ��������� allowable_tags ����� �������� ����, ������� �� ������� ������� �� ������. ��� ������ ������������� �������� ���� � �����.
������� �� ������ ����.
��������� :
string strip_tags(string str [, string allowable_tags])
��� ������� ������� �� ������ ��� HTML- � PHP-���� � ���������� ���������.
������������� ��� ��������� ���� �������� ������.
� ��������� allowable_tags ����� �������� ����, ������� �� ������� ������� �� ������. ��� ������ ������������� �������� ���� � �����.
$st=" <b>������ �����</b> <tt>���������� �����</tt> <a href=https://spravkaweb.ru>������</a>"; echo "�������� �����: $st"; echo "<hr>����� �������� �����: ".striptags($st,"<a><b>"). "<hr>";�������� ���� ������, �� ������ ��������, ��� ���� <a> � <b> �� ���� ������� (����� ��� � �� ������ �����������), � �� ����� ��� <tt> �����.
get_meta_tags
������� ���� � ������������ ��� ���� <META>.
��������� :
array get_meta_tags(string filename, int use_include_path)
������� ��������� ���� � ���� � ��� ��� ���� <META> �� ��� ���, ���� �� ���������� ����������� ��� </head>.
���� ��������� ��� <META> ����� ���:
<meta name="��������" content="����������">
�� ���� ��������=>���������� ����������� � �������������� ������, ������� ��� ����� � ������������.
����������� � �������� �������� filename ���������� �� ���� ������������� "_", � ���������� ������� ������������� � ������ �������.
������� ������ ������������ ��� �������� ��������� ���� ��������� �� ���������� �����.
���� �������������� �������� use_include_path ����������, �� ����� ����� �������������� �� ������ � ������ ��������, �� � �� ���� ���, ������� ��������� ��� ������ ������������ include � require.
������� ���� � ������������ ��� ���� <META>.
��������� :
array get_meta_tags(string filename, int use_include_path)
������� ��������� ���� � ���� � ��� ��� ���� <META> �� ��� ���, ���� �� ���������� ����������� ��� </head>.
���� ��������� ��� <META> ����� ���:
<meta name="��������" content="����������">
�� ���� ��������=>���������� ����������� � �������������� ������, ������� ��� ����� � ������������.
����������� � �������� �������� filename ���������� �� ���� ������������� "_", � ���������� ������� ������������� � ������ �������.
������� ������ ������������ ��� �������� ��������� ���� ��������� �� ���������� �����.
���� �������������� �������� use_include_path ����������, �� ����� ����� �������������� �� ������ � ������ ��������, �� � �� ���� ���, ������� ��������� ��� ������ ������������ include � require.
get_html_translation_table
������� ���������� ������� ����������, ������� ������������ ��������� htmlspecialchars() � htmlentities().
��������� :
string get_html_translation_table(int table [, int quote_style])
� ���� ������� �������� table ���������, ����� ������� ���������� ���������� ��������: HTML_SPECIALCHARS ��� ������� htmlspecialchars() ��� HTML_ENTITIES ��� ������� htmlentities(). �������� ��������������� ��������� quote_style ��������� � ������� htmlspecialchars().
������� ���������� ������� ����������, ������� ������������ ��������� htmlspecialchars() � htmlentities().
��������� :
string get_html_translation_table(int table [, int quote_style])
� ���� ������� �������� table ���������, ����� ������� ���������� ���������� ��������: HTML_SPECIALCHARS ��� ������� htmlspecialchars() ��� HTML_ENTITIES ��� ������� htmlentities(). �������� ��������������� ��������� quote_style ��������� � ������� htmlspecialchars().
$trans = get_html_translation_table(HTML_ENTITIES); $str = "<A & B>"; $encoded = strtr($str, $strans); // $encoded = "&lt; A & B >"������ ������ ������������ ������� array_flip() ��� ��������� ����������� ��������������.
$trans = array_flip($trans); $original = strtr($encoded, $trans);
htmlspecialchars
���������� �������������� ������������ � HTML-�������������.
��������� :
string HtmlSpecialChars(string str [, int quote_style]);
�������� ���������� ���� ������� - �������������, ��� � ��������� ������ �� ���� ������� �� ����� ��������� ��� ���.
�������� � ������ ��������� ������� (����� ��� ���������, ������� � ����� "������" � "������") �� �� HTML-�����������,���, ����� ��� ��������� �� �������� "������ �����". ����� �������� ���������� ���� ������� - ������������ ��������� value � ��������� ��������� �����, ����� �� ���� ������� ������� � ���������, ��� �� ����� ��������� � �������� �����, ���� ��������� ���� ������������ ���������. ��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:ENT_COMPAT (�� ���������) - ��������� ���������� ������ ������� �������
ENT_QUOTES - ��������� ���������� ����� �������
ENT_NOQUOTES - ��������� ���������� ����� �������
���������� �������������� ������������ � HTML-�������������.
��������� :
string HtmlSpecialChars(string str [, int quote_style]);
�������� ���������� ���� ������� - �������������, ��� � ��������� ������ �� ���� ������� �� ����� ��������� ��� ���.
�������� � ������ ��������� ������� (����� ��� ���������, ������� � ����� "������" � "������") �� �� HTML-�����������,���, ����� ��� ��������� �� �������� "������ �����". ����� �������� ���������� ���� ������� - ������������ ��������� value � ��������� ��������� �����, ����� �� ���� ������� ������� � ���������, ��� �� ����� ��������� � �������� �����, ���� ��������� ���� ������������ ���������. ��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:
$str = htmlspecialchars("<a href=index.php>�������</a>", ENT_QUOTES);
htmlentities
���������� ����������� ��������, ������� HTML-�������������.
��������� :
string htmlentities(string str [, int quote_style]);
��� ������� ������ �� htmlspecialchars(), �� ������ � ��� ������������� �� ���������� ����������, � ������ - ��� ���� ��������, ������� ����� ����� ������������� HTML-�������������.
��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:ENT_COMPAT (�� ���������) - ��������� ���������� ������ ������� �������
ENT_QUOTES - ��������� ���������� ����� �������
ENT_NOQUOTES - ��������� ���������� ����� �������
���������� ����������� ��������, ������� HTML-�������������.
��������� :
string htmlentities(string str [, int quote_style]);
��� ������� ������ �� htmlspecialchars(), �� ������ � ��� ������������� �� ���������� ����������, � ������ - ��� ���� ��������, ������� ����� ����� ������������� HTML-�������������.
��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:
hebrev
����������� ����������� ������ Hebrew � ������������.
��������� :
string hebrev(string hebrew_text [, int max_chars_per_line]);
�������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� �����.
����������� ����������� ������ Hebrew � ������������.
��������� :
string hebrev(string hebrew_text [, int max_chars_per_line]);
�������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� �����.
hebrevc
������ ������� hebrev � ������������ ���������.
��������� :
string hebrevc(string hebrew_text [, int max_chars_per_line]);
������� hebrevc() ������ � hebrev() � ��� ��������, ��� ��� ����������� ������� �������� ����� "\n" � "<br>\n". �������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� ����.
������ ������� hebrev � ������������ ���������.
��������� :
string hebrevc(string hebrew_text [, int max_chars_per_line]);
������� hebrevc() ������ � hebrev() � ��� ��������, ��� ��� ����������� ������� �������� ����� "\n" � "<br>\n". �������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� ����.
quoted_printable_decode
�������������� ������������ ������ � 8-������.
��������� :
string quoted_printable_decode(string str);
�������������� ������������ ������ � 8-������.
��������� :
string quoted_printable_decode(string str);