Php program to print the number using decoct

A Php program to print the number using decoct. In this program we can print the number using decoct to convert decimal to octal number. A decimal number is converted to an octal number using the decoct() function. Only one parameter is required, which is the number to be converted. A decimal number is converted to an octal number using the decoct() function. It returns an octal string with the decimal value supplied.

<?php 
echo (decoct(22)."<br/>");
echo (decoct(101)."<br/>");
echo (decoct(242)."<br/>");
?>

 

Output:

26

145

362

What is decimal number?

The base-10 number system, which is arguably the most widely used, is referred to as decimal. There are 10 single-digit numbers in the decimal number system: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

What is octal number?

The octal numeral system, or oct for short, is a base-8 number system that uses the digits 0 to 7. In decimal terms, 10 represents 8 and 100 represents 64.

What is BR in html and php programming

The constituent of a line break. In text, the br> HTML element creates a line break (carriage-return). It’s beneficial when composing a poem or an address where the line division is important.