If you plan to do this for passwords, do not use MD5 or SHA1 . It is known that they are weak and unsafe, even with salt.
If you use them for other purposes (for example, providing a hash of a file to confirm its authenticity or a random hash database column to provide a pseudo-random sort order), then they are accurate (down to the point), but not for passwords or anything else, what you consider necessary to keep safe.
The current best-use password algorithm is BCrypt with the appropriate password resolution.
And the best way to implement BCrypt password hashing in PHP is to use the PHP API of the new password. This API will be introduced as a set of built-in functions in the next version of PHP, v5.5, which is due out in the next few months. The good news is that they also released a backward compatibility version for users of current versions of PHP (5.3 and 5.4), so although PHP 5.5 is not yet released, you can start using the new API right away.
You can download the compatibility library here: https://github.com/ircmaxell/password_compat
Also: You asked what "salt" is. Since I already mentioned this a couple of times in this answer, I should consider this part of the question as well.
Salt is basically an extra line added to the password when it is hashed to make it more difficult to crack.
For example, an attacker may know in advance what hash value for a given password string, or even a series of specified password strings. If he can get your hashed data, and you have not used salt, then he can simply compare your hashes with his list of known passwords, and if any of your users uses an easily guessed password, they will crack in seconds, regardless of what hashing method was used.
However, if you added a secret extra line to the password when you use it, the hashed value will not match the standard hashes for the original password, which makes it difficult for an attacker to find this value.
The good news is that if you use the API I mentioned above, you donβt have to worry too much about the details of this, as the API handles the pickling for you.
Hope this helps.