How about:
foreach(array(458752, 131586, 65793) as $x) {
$j = intval($x / 65536);
$x = $x % 65536;
$i = intval($x / 256);
$k = $x % 256;
echo "x=$x, i=$i, j=$j, k=$k\n";
}
output:
x=0, i=0, j=7, k=0
x=514, i=2, j=2, k=2
x=257, i=1, j=1, k=1
2
solved PHP value=arraykey + arraykey + arraykey [closed]