-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_10.php
More file actions
54 lines (30 loc) · 1.13 KB
/
Copy pathphp_10.php
File metadata and controls
54 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
$decimal=0;
$hex="00".dechex($decimal)."00";
echo "<table border=\"1\" width=\100px\">";
for ($n1=0;$n1<16;$n1++){
echo "<tr>";
for ($n2=0;$n2<=2;$n2++){
if($n2==0){
$decimal=$decimal+5;
$hex="00".dechex($decimal)."00";
echo "<td style='background-color: #$hex'>$n1</td>";
echo $hex;
}
if($n2==1){
$decimal=$decimal+5;
$hex=dechex($decimal)."00"."00";
echo "<td style='background-color: #$hex'>$n1</td>";
echo $hex;
}
if($n2==2){
$decimal=$decimal+5;
$hex="00"."00".dechex($decimal);
echo "<td style='background-color: #$hex'>$n1</td>";
echo $hex;
}
}
}
echo "</tr>";
echo "</table>";
?>