This is a very bad thing to do.
You should never open and edit a .php file
With PHP, you have a file like "index.php" that uses a database to display content.
It's that database (of text), not the actual "index.php" file that you edit.
You edit content, not code.
Here's the reason why:
What if I figure out a way to get in and edit your "index.php" file?
I could edit the PHP script to do whatever I want, such as delete your whole website.
You have to re-think your whole idea here ... or re-ask your question if you didn't ask it correctly.