Why is it recommended to add code directly in the forum post instead of sharing it as an image or reference?

When code is shared as an image or reference, it cannot be easily copied and pasted for testing or implementation by other users. This can make it difficult for others to troubleshoot or modify the code. By adding code directly in the forum post, it allows for better readability, accessibility, and ease of use for everyone involved.

// Example PHP code snippet
<?php
// Your PHP code here
?>