dimanche 12 juin 2016

echo background image with a value


I echo out an image like that:

$newString = $thumbPre.'profilemain'.$thumbPost;
echo "<img src='http://render-api-us.worldofwarcraft.com/static-render/us/" . $newString. "' alt='error'>";

Now i want the image as a background-image, i tried it like that, but it doesn´t work:

echo '<div style="background-image:url('http://render-api-us.worldofwarcraft.com/static-render/us/" . $newString. "' alt='error');"></div>';

Aucun commentaire:

Enregistrer un commentaire