I have loaded an image in a variable like this :
$img = imagecreatefromjpeg('my_image.jpg');
Now I want to use that image variable as a background for an html element. I tried this :
<div id="container" style="background:<?php imagejpeg($img);?>;"></div>
And I failed miserably. I don't know how to proceed.