SyntaxFix
Write A Post
Hire A Developer
Questions
Put the database password in a file, make it read-only to the user serving the files.
Unless you have some means of only allowing the php server process to access the database, this is pretty much all you can do.