What are some best practices for sharing PHP code in a forum to receive help and feedback from other users effectively?

Here is an example of how to effectively share PHP code in a forum to receive help and feedback from other users: Issue: I am trying to connect to a MySQL database using PHP but I keep getting a "Connection failed" error. Code snippet:

```php
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
$conn->close();
?>
```

By providing a clear explanation of the issue and a complete code snippet, other users will be able to easily understand the problem and offer suggestions for improvement. Additionally, make sure to format the code snippet properly using code blocks to make it easier to read and understand.