Flickr badge continued
On Javascript kit I found this tutorial: external JavaScript and php. At this point, I really thought I had the solution.
So, I rewrote the php function accordingly:
<?php
header("content-type: application/x-javascript");
echo "document.write('<div id=\"photos_wrapper\">');";
echo "document.write('<div id=\"photos\">');";
echo "document.write('<script type=\"text/javascript\" src=\"http://www.flickr.com/badge_code_v2.gne?...\"></script>');";
echo "document.write('</div>');";
echo "document.write('</div>');";
?>
then placed a link to the external file inside the page where the badge is supposed to be:
<script src="functions/flickr.php" type="text/javascript"></script>
In Mozilla Firefox everything is all right, it validates and...IE puts the images OUTSIDE the div!! Why? Have no idea...

The simple fact that is possible to have some kind of data exchange between php and Javascript is very interesting in itself and I had never read anything about it before. I definitely learned something but I still haven't found the solution to the problem...