|
|
Tutorials » Php »
|
Topic |
What is md5 Function and how it is used in string?
|
|
Explanation |
|
This function is used to calculate the md5 hash of a given string in PHP.
Syntax:
md5(string,raw)
In the above syntax "string" specifies the strings to calculate the md5 hash, "raw" specifies the
output format if true then it will be in binary format else in hexa decimal format.
Example:
<?php
$str = "HIOX INDIA";
echo md5($str);
?>
Result:
3a1d5729f5301d8960e762f5751860d4
In the above md5 Function example the string "HIOX INDIA" is encrypted using md5 hash to display the result.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|