Email with attachment

how do I send an email with an attachment called test.png? I don’ understand the ref at http://php.net/manual/en/function.mail.php

<?php
$from = "info@lin.com";
$to = "nihe@neb.rr.com";
$subject = "Test";
$message = "1234567890";
$headers = "From: $from\\r\
";
$headers .= "Content-type: text/html\\r\
";
mail($to, $subject, $message, $headers);
?>

.

Read this article and see if it helps:

http://webcheatsheet.com/php/send_email_text_html_attachment.php#attachment