Question: I have a function in java, which transposes a 2D array. But this function takes only double[][]. Is there a way to make it take all types of data type?(I mean like a global function that accepts any data type as input and returns result in that particular data type?) My code is as follows:

```
public static double[][] transpose(double[][] a)    
{
    double[][] trans = new double[a[0].length][a.length];
    if (a.length > 0)
    {
        for( int i = 0; i < a[0].length; i++)
            {
            for(int j=0; j<a.length; j++)
                {
                    trans[i][j] = a[j][i];
                }
            }
    }return trans;  
}

```

Answer: 
Add this tag where you want the image to appear in the body

```
$mail->Body = "... <img src='cid:logo.png> ..";

$mail->AddEmbeddedImage($_SERVER['DOCUMENT_ROOT']."[path_to_image] logo.png",'logo.png','logo.png');

```

Works in Outlook and all other email client software
This reason why this isn't working is because you haven't assigned the string containing the html for the image to a variable that's used in the email body. The problem is with the semi-colon on the second line and then the way you reference the image in the string on the third line.

```
$mail->AddEmbeddedImage('images/Kartka.png', 'Kartka');
$mail->Body = "<h1>Test 1 of PHPMailer html</h1><p>This is a test</p>";
    "<p>This is a test picture: <img src=\"images/Kartka.png\" /></p>";

```

Should be

```
$mail->AddEmbeddedImage('images/Kartka.png', 'Kartka');
$mail->Body = "<h1>Test 1 of PHPMailer html</h1><p>This is a test</p>".
    "<p>This is a test picture: <img src=\"cid:Kartka\" /></p>";

```

Or alternatively

```
$mail->AddEmbeddedImage('images/Kartka.png', 'Kartka');
$mail->Body = "<h1>Test 1 of PHPMailer html</h1><p>This is a test</p><p>This is a test picture: <img src=\"cid:Kartka\" /></p>";

```