Echo not working - what am I doing wrong?

I am trying to echo the following:

echo "<td>" . "<img src=\\"" . $_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $file_base_name . "\\"" . "alt=\\"" . $row2['filename'] . "\\"" . "/>" . "</td>";

Which should display an image in the table cell. I can confirm that the variables $file_base_name and $row_table2[‘filename’] are filled – I’ve echoed each independently and got the desired results.

The above code produces:

<td><img src="example.com/uploads/" alt="" /></td>

Variables after $_SERVER[‘DOCUMENT_ROOT’] are not being interpreted, and I don’t know why.

Sounds like those variables do not exist in the scope. Did you dump the variables in the same exact file and get the proper results or was it a different file?

I did more testing, and it turns out server[‘document_root’] was giving me problems by outputting the absolute path, including c:\. Thanks for the attempted help though.