ex.อธิบายฟังชั่นก์

Post a reply

Smilies
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: ex.อธิบายฟังชั่นก์

ex.อธิบายฟังชั่นก์

by offing » 22/08/2014 2:37 pm

convert function การแปลงเลขฐาน

ิdecbin() = 10to2
decoct() = 10to8
dechex() = 10to16
hexdec() = 16to10

Code: Select all

<?php
$dec = 204;
$hex = "FE";
echo "กำหนดให้ d = 204";
echo "<br>";
echo "d to b = ";
echo decbin($dec);
echo "<br>";
echo "d to h = ";
echo dechex($dec);
echo "<br>";
echo "d to o = ";
echo decoct($dec);
echo "<hr>";
echo "กำหนดให้ h = FE";
echo "<br>";
echo "h to d = ";
echo hexdec($hex);


?>
ผลลัพธ์
1.jpg
1.jpg (14.13 KiB) Viewed 304 times

Top