Actually i want to print the content with below code sample.
$html
having my all HTML
which i want to print without render a View in Browser and without print/show in browser.
I am trying to find a Same method as window.print();
works. But need in PHP
. I don't want to show all the HTML
in Browser.
Is there any method or Trick ?
Any suggestion can help me lot.
Thank you.
My Sample Code:
$arr = array('one','two','three','four','five');
$html = "<div style='background:red;color:black;'>";
foreach($arr as $value){
$html .= $value.'<br />';
}
$html .= "</div>";
// print code to print $html content as same as JS window.print() works.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…