How can code readability be improved when displaying PHP code in a forum post?

When displaying PHP code in a forum post, code readability can be improved by using proper indentation and formatting. This makes the code easier to read and understand for other users. Additionally, using code tags or a code formatting tool can help distinguish the code from the rest of the post.

<?php
// Example PHP code snippet with improved readability
$variable = 'Hello, World!';
echo $variable;
?>