數學函式庫

base_convert

(PHP3 >= 3.0.6 , PHP4)

base_convert ---  轉換數值的進位方式

語法 : strin base_convert(string number, int frombase, int tobase);

說明 : 

傳回由frombase進制轉為tobase進制的字串,參數frombasetobase介於包含236之問。若超過10進制則會以字母a-z表示,a代表10b代表11z代表36

Example :

<?php

   $binary = base_convert($hexadecimal, 16, 2);

?>


上一頁 首頁 下一頁