PHP is a server side language, which means it can't carry out commands like this on a local machine.
If you had the Print function in a page, it would be executed on the server, and the client would not know anyhting about it.
Like torrent said, you should use Javascript.
Anand