...

View Full Version : Print Between tags?



dniwebdesign
01-14-2004, 05:11 AM
Is there anyway I can get a page (located in a frame) to print the content between to tags.

For example:

blah, blahblah, blahblah, blahblah, blah
blah, blahblah, blah
blah, blahblah, blahblah, blahblah, blah
<print>
THIS CONTENT IS PRINTED
</print>

This isn't.blah, blahblah, blahblah, blahblah, blah

I have a page that has some extra content I don't want when it is going to be printed. Thanks.

DsgnrsTLZAdmin
01-15-2004, 09:59 PM
<?php
$content = "blah blah blah";
print $content;
?>



thats the best i can understand what you have said....

Nightfire
01-15-2004, 11:21 PM
To just hide stuff from a printer is nothing to do with php, but your question is sorta confusing. So I don't know if DsgnrsTLZAdmin answered your question, or if this will


<html>
<head>
<style type="text/css">
@media print {
.dontPrintMe{display : none;}
}
</style>
</head>
<body>

<p>blah blah blah <span class="dontPrintMe">You can't print this :p </span> blah blah blah</p>
</body>
</html>

DsgnrsTLZAdmin
01-15-2004, 11:40 PM
Reading this again, i think i understand what you mean. But like NightFire said, it has nothing to do with php but if you want to use it? do this:


<?php
//this will not be printed.
print "this will be printed";
//this will not be printed.
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum