How to use unpack in PHP

In this article I will explain how unpack Function can be used in PHP.
  • 1815

unpack() Function

This function unpacks data from a binary string.

Syntax

unpack(format,data)

Example

<html>
<body>
<?php
$data = "PHP";
print_r(unpack("C*",$data));
?>
</body>
</html>

 

Output

 
unpack-php.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.