Well, first off. If the php engine is turned on, then the chances of someone seeing your password are close to zero, since the password will get read and interpreted by the php engine and never passed out to the browser. If you're worried about "accidents" revealing your password, then you can put it into an include file in another directory that isn't in the same path as your web files.
Check to see what your include path is by running phpinfo in a php script and looking for include path. On my computer it's:
./:/www/php_include
That means that ./ (the current directory) and /www/php_include are the two places php code looks for include files. Since /www/php_include is not in the same area as my web pages, it isn't viewable should anything go wrong and the server stop interpreting php code.
By putting sensitive things into php_include, I can make sure that my include files never get served raw. another trick is to put the .inc files in your home directory and tell apache to never serve those kinds of files. not sure of the syntax off the top of my head n that one.