How to Print Hexadecimal Numbers in PHP or Java

后端 未结 5 1294
青春惊慌失措
青春惊慌失措 2021-01-02 02:27

I need to print some data (a little bit strange formatted). I was writing it in PHP with if ($num%10==9) but it was impossible for me to get correct output.

So take

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 03:13

    You need to print the numbers 1 to 30 in hexadecimal notation. Try this method for each line:

    dechex ( int $number )
    

提交回复
热议问题