Are you searching for a way to encrypt and secure a password or just a simple phrase? If the answer is yes, in php exists a lot of functions which does that, but the most popular is md5() encrypting function. It simply cant be decrypted.
<?php $password = "mypass"; $password = md5($password); ?>