This speaks of very poor design. It would make sense to use PHP to modify/maintain .htaccess files, but it doesn't make sense to use .htaccess files as a storage place for PHP user logins. If you like the concept of using a file, rather than a database, to store username/password combos, why don't you just put a plain-text file outside of the web-accessible directory structure and authenticate off of that?
Now if you are talking about using PHP to grant HTTP Authentication using the .htaccess file and bypassing the typical login pop-up, that is another question altogether. I don't think it is possible, but I will look. I still think it would be better design to stay away from the HTTP Authentication model completely if you don't really want to use it.
You might want to read this PHP-Based User Authentication guide for beginners for some ideas.