Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Octal to Hexadecimal Conversion Program Code in PHP

Octal to Hexadecimal Conversion Program Code in PHP

In this tutorial we will learn the code of “Octal to Hexadecimal Conversion Program Code in PHP”.

Code of “Octal to Hexadecimal Conversion Program Code in PHP”

<html>
<body>
<p>
Octal to Hexadecimal Conversion Program Code in PHP
</body>
</p>
</html>
<?php
echo "Octal Number = 7654<br>";
echo "After Change In Hexadecimalvalue =";
$oct = "7654"; 
echo base_convert($oct,8,16); 
?>

The output of code of”Octal to Hexadecimal Conversion Program Code in PHP”

Octal to Hexadecimal Conversion Program Code in PHP

Fig: Octal to Hexadecimal Conversion Program Code in PHP

 

Octal to Hexadecimal Conversion Program Code in PHP with form values entered by the user

In this tutorial, we will learn the code of “Octal to Hexadecimal Conversion Program Code in PHP with form values enter by user”

Code of “Octal to Hexadecimal Conversion Program Code in PHP with form values enter by the user”

<html>
<h3>Conversion from Octal To Hexadecimal</h3>
</html>
<html>
<body>
<form method="post">
Enter Octal Value:<br>
<input type="text" name ="num1"><br>
<input type="submit" name="submit"><br>
</form>
</body>
</html>
<?php
if(isset($_POST['submit'])){
	$oct=$_POST['num1'];
        echo "The Value after Conversion  <br>";
	echo base_convert($oct,8,16);
	
	
	;}?>

The output of code of  “Octal to Hexadecimal Conversion Program Code in PHP with form values enter by user”

Octal to Hexadecimal Conversion Program Code in PHP with form values enter by user

Figure: Octal to Hexadecimal Conversion Program Code in PHP with form values entered by the user

Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.