What can we possibly do with your post? You didnt ask a question or specficy what problem you are having..

PHP is a server-side scripting language. If you need to control printing, that's going to be handled client side. For example, you can include a button on your page, or an icon of a printer that lauches the printer controls of the user's PC. What you need to do is display the page accordingly so it's layout is printer friendly. You do that by appying the appropriate styles. You can use the @media rule to set the layout printer friendly.