How can the automatic line wrapping of long code lines be avoided when displaying PHP code with line numbers in a forum?

To avoid automatic line wrapping of long code lines when displaying PHP code with line numbers in a forum, you can use the HTML <pre> tag to preserve the formatting. This tag preserves whitespace and line breaks, ensuring that the code is displayed exactly as it is written without any automatic wrapping.

&lt;pre&gt;
&lt;?php
// Your PHP code with line numbers here
?&gt;
&lt;/pre&gt;