Returning an image url from its attachment ID using a custom post type plugin

Too many echos. This:

echo '<img src="https://wordpress.stackexchange.com/questions/56498/<?php echo $image_attributes[0]; ?>" />';

Should be this:

echo '<img src="' . $image_attributes[0] . '" />';

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)