How can CSS be used to add spacing between elements in PHP output?

To add spacing between elements in PHP output using CSS, you can apply margin or padding properties to the elements. By using CSS, you can easily control the spacing between elements and customize it according to your design requirements.

<?php
echo '<div style="margin-bottom: 10px;">Element 1</div>';
echo '<div style="margin-bottom: 20px;">Element 2</div>';
echo '<div style="margin-bottom: 30px;">Element 3</div>';
?>