PHP Tutorial > String Functions > md5 Function
The md5 function in PHP is used to calculate the md5 hash of a string. It is commonly used to encrypt a string.
The syntax of the md5 function is:
md5 ('string', [raw_output])
string is the string to be encrypted. [raw_output] is optional and specifies the output format. It is a boolean parameter which can either be TRUE or FALSE. The default is FALSE.
Let's take a look at the example below:
Example
print md5('1');
Result:
c4ca4238a0b923820dcc509a6f75849b
Next: PHP number_format Function
Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.
More Tutorials: SQL CSS HTML
Copyright 2007-2010 1keydata.com All Rights Reserved. Privacy Policy
|