Get MD5 for a string in PHP

Description

The following code shows how to get MD5 for a string.

Example


<?php//from   w  w w.  j  a v  a 2  s.  c  o  m
    $val = "secret";
    $hash_val = md5 ($val);
    echo $hash_val;
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions