����������
WEB - ������

www.spravkaweb.ru Rambler's Top100
 ï¿½ï¿½ ����������: �������/PHP/�������������� �������.������� � ��������� ������� ���������Ðàñïå÷àòàòü 
�������
�������
����� ���
HTML
JavaScript
VBScript
CSS
Flash
Perl
PHP
MySQL
SSI
VRML
�������������
������
Download
�����
��������
������
�������� ���
�����:
��������
Subscribe.Ru:

PHP

<--����� | ��������� � ������ | ������-->
�������������� �������
������� � ��������� ������� ���������
base_convert
����������� ����� �� ����� ������� ��������� � ������.

��������� :
string base_convert(string $number, int $frombase, int $tobase)

��������� ����� $number (�������� ��� ������ � ������� ��������� �� ��������� $frombase) � ������� �� ��������� $tobase. ��������� $frombase � $tobase ����� ��������� �������� ������ �� 2 �� 36 ������������. � ������ $number ����� ���������� ���� ����, � ����� a ������������� 11, b -12, � �.�. �� z, ������� ���������� 36. ��������, ��������� ������� ������� 11111111 (8 ��������), ������ ��� ��� - �� ��� ����, ��� ������������� ������������������ ����� FF � �������� ������� ���������:

$x = base_convert("FF",16,2);       //$x = 11111111
$x = base_convert("11111111",2,16); //$x = FF
$x = base_convert("200",10,16);     //$x = C8

bindec
���������� ����������� ��������� ����� � ����������.

��������� :
int bindec(string binary_string)

����������� �������� �����, �������� � ������ binary_string, � ���������� �����. ������������ �����, ������� ��� ����� ���� �������������, ����� 2 147 483 647
$x = bindec(11111111); // $x = 255
$x = bindec(10101010); // $x = 170
$x = bindec(2147483647); // $x = 1111111111111111111111111111111

decbin
���������� ����������� ����������� ����� � ��������.

��������� :
string decbin(int $number)

���������� ������, �������������� ����� �������� ������������� ������ ����� $number. ������������ �����, ������� ��� ����� ���� �������������, ����� 2 147 483 647, ������� �������� ��� 31 �������� � �������� �������.

���������� ����������� ������� ��� ������������ � ����������������� ������. ���������� ��� ��� ��, ������ ������ "bin" ������������� �������������� "oct" � "hex".
$x = decbin(255); // $x = 11111111
$x = decbin(2147483647); // $x = 1111111111111111111111111111111

dechex
���������� ����������� ����������� ����� � �����������������.

��������� :
string dechex(int number)

���������� ������, �������������� ����� ����������������� ������������� ������ ����� number. ������������ �����, ������� ��� ����� ���� �������������, ����� 2 147 483 647
$x = dechex(2147483647); // $x = 7fffffff

decoct
���������� ����������� ����������� ����� � ������������.

��������� :
string decoct(int number)

���������� ������, �������������� ����� ������������ ������������� ������ ����� number. ������������ �����, ������� ��� ����� ���� �������������, ����� 2 147 483 647
$x = dechex(2147483647); // $x = 17777777777

hexdec
���������� ����������� ������������������ ����� � ����������.

��������� :
int hexdec(string hex_string)

����������� ����������������� �����, �������� � ������ hex_string, � ���������� �����. ������������ �����, ������� ��� ����� ���� �������������, ����� 7fffffff
$x = hexdec(7fffffff); // $x = 2147483647

octdec
���������� ����������� ������������� ����� � ����������.

��������� :
int octdec(string octal_string)

����������� ������������ �����, �������� � ������ octal_string, � ���������� �����. ������������ �����, ������� ��� ����� ���� �������������, ����� 17777777777
$x = octdec(17777777777); // $x = 2147483647

deg2rad
���������� ����������� �������� � �������.

��������� :
double deg2rad(double number)

����������� �������, �������� � ��������� number, � �������.

rad2deg
���������� ����������� �������� � �������.

��������� :
double rad2deg(double number)

����������� �������, �������� � ��������� number, � �������.

number_format
�������������� �����.

��������� :
number_format($number, $decimals, $dec_point=".", $thousands_sep=",");

��� ������� ����������� ����� � ��������� ������ � ����������� ��� �� ������ � ��������� ���������. ��� ����� ���� ������� � ����� ��� �������� �����������, �� �� � �����! �������� $decimals ������, ������� ���� ����� ������� ������ ���� � ����� � �������� ������. �������� $dec_point ������������ ����� ����������� ����� � ������� ������, � �������� $thousands_sep - ����������� ����� � ����� (���� ������� �� ��� ����� ������ ������, �� ������ �� ���������� ���� �� �����).
�� ���������� ����� ����� ������� "PHP 4. ����������� ����������."
www.piter.com
������ / � ����������
 
Download
Ñêà÷àòü ñïðàâî÷íèê ïî PHP
��� ������:
05.07.2004
  • � ������� PHP ��������� ��������� ������� ��� ������ � ���������� (���������� GD):
    imagetypes(), ...
  • � ������� JavaScript ��������� �������� �� ����� D, E, F, H, I
  • � ������� ������ ��������� ������, �������������� ��� �������� � html-�������� ��������� MS Office (Word, Excel � �.�.)
  • �����������:
    ���� ��������� � ������� �����:
    ��������.
    ������������.
    ��� ����.
    ������ � �������.
    �������.
    ������ ���� �� ���������.
    ��������:
    Rambler's Top100
    Ñäåëàòü ñòðàíèöó ñòàðòîâîé ������� �������� ���������
    Äîáàâèòü ñòðàíèöó â èçáðàííîå �������� ���� � ���������
    Ñîîáùèòü îá íàéäåííîé îøèáêå �������� �� ������