PHP file must be interpreted by web server (you may use XAMPP, which is popular set of servers for Windows including Apache HTTP server, MySQL database server and PHP extension for Apache).
Server executes PHP code and sends script output/result via http protocol to web browser.
Opening that file via filesystem is bad idea, because PHP file will be read as plain text if it is not processed by web server with PHP.
It looks like, you dont understand how PHP works. You need to read some books about web fundamentals.
Eventually you can visit http://thenewboston.org or http://phpacademy.org - they have very good educational videos.
One more advice to consider:
In my personal opinion Dreamwaver is very bad tool for learning PHP. For learning purposes I recommend to use Notepad++ or some other IDE (maybe NetBeans PHP edition). It will help you to understand more.
How to debug php code in dreamweaver cs5?