Jump to: navigation, search

Php decoct

From w3cyberlearnings

Contents

PHP function decoct

This function converts decimal to octal, and it returns octal string representation of number.

Syntax decoct

X is a number.

decoct(X);

Note

Convert Octal to Decimal uses octdec() function.

Example 1

<?php

echo decoct(16);
echo "<br/>";
echo decoct(74);

// use CONV in mysql
// SELECT CONV(74,10,8); 
?>

Output

20
112

Related Links


Navigation
Web
SQL
MISC
References