print html page code example
Example 1: print button code in php
<button onClick="window.print()">Print</button>
Example 2: how to print in html
Javascript
console.log("Text");
<button onClick="window.print()">Print</button>
Javascript
console.log("Text");