I have a function to generate thumbnail images. the function is working. Code is as follows:
Code:
<?php
function thumb($pic)
{
//echo "function thumb running
";
$image = $pic;
$size = getimagesize("$image");
$height = $size[1];
$width = $size[0];
if ($height > 150)
{
$height = 150;
$percent = ($size[1] / $height);
$width = round($size[0] / $percent);
}
else if ($width > 150)
{
$width = 150;
$percent = ($size[0] / $width);
$height = round($size[1] / $percent);
}
return '<img src=\"http://www.easystreet247.com/upload_files/$image\" height=\"$height\" width=\"$width\" >';
}
?>
The problem is that the image is not displaying when I call the function in code as follows:
Code:
$stuff0 = "<TR><td><table border=\"0\"><tr><td><a href=\"upload_files/$fullsize\" onclick=\"window.open(this.href); return false;\">thumb($thumbnail)</a> </td><td></td>";
All that gets displayed is the name of the image as a hyperlink, instead of the image itself. I'm sure it's in the string settings, but I'm having a devil of a time figuring it out.
Can someone please help me with the string settings?