How can CSS be used to control page breaks for printing in PHP-generated content?

To control page breaks for printing in PHP-generated content, you can use CSS properties like `page-break-before`, `page-break-after`, and `page-break-inside`. By applying these properties to specific elements in your PHP-generated content, you can control where page breaks occur when the content is printed.

<?php
echo '<style>
    .page-break { page-break-after: always; }
</style>';

echo '<div class="page-break">Content for first page</div>';
echo '<div class="page-break">Content for second page</div>';
?>