2Creative wrote:but when I do that it will send the password to the email but it is hashed so the email shows it as 4w95823095831861087613586186t093256[1
Logically, what you have done should work, i.e., $password contains the password before hashing, so you send it in the email. However, you have left out code in between, so perhaps in code that you did not show, you accidentally changed $password to be an empty string or null.
2Creative wrote:i need it to send password before hashed to email
You should force your users to change the temporary password immediately after logging in as email is generally an insecure channel. In the interest of security, and assuming that you are using SSL/TLS, it may be easier to have the user specify the password at registration, though this may have the negative effect of deterring some users from registering.