I think you need to understand what php is.
A page that has the .htm (.html) suffix is parsed immediately by the server. (jargon for displayed on the clients browser)
A page that has the php suffix (.php) is first sent to a php processor that ‘reads’ the php script and parses the htm code that it generates from the php code content in the page. The generated content is usually things that can’t be hard coded.
php is different from java script in that php generates the output on the server whilst java script generates the content on the clients computer after the page has been parsed.
So if you simply add the suffix .php to a static page all you will achieve is slowing things down because the page now goes via the php processor.
It doesn’t matter if you code in design view or code view, you won’t be able to see the php output because Dreamweaver is not a php processor and therefore can’t generate html from php code.
To see and test the output a php page generates you need to install a local server (apache for instance) and php on your own computer or use your web host.