Hey guys here i am again 🙁
I have this fuction :
function add_schaduw_thumb($image_name,$thumb_path,$image_id,$i) {
$thumb_size = GetImageSize("".$thumb_path."/".$image_name."");
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo "<tr><td width=\"".$thumb_size[0]."\" height=\"".$thumb_size[1]."\"><a href=\"index.php?act=foto&id=".$image_id."\"><img src=\"$thumb_path/$image_name\" width=\"".$thumb_size[0]."\" height=\"".$thumb_size[1]."\" border=0></a></td>";
echo "<td width=\"5\" height=\"".$thumb_size[1]."\" valign=\"top\" background=\"images/image_RM.gif\"><img src=\"images/image_RB.gif\"></td>";
echo "</tr><tr>";
echo "<td height=\"7\" width=\"".$thumb_size[0]."\" valign=\"left\" background=\"images/image_OM.gif\"><img src=\"images/image_LO.gif\"></td>";
echo "<td><img src=\"images/image_RO.gif\"></td></tr></table></td><td width=\"107\" align=\"center\">";
if ($i == $thumb_regel) {
echo "</td></tr></table>";
echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\"><tr><td align=\"center\">";
}
}
And the line of code in another file :
$i = 1;
while($row = mysql_fetch_array($result))
{
$image_path = "$path_albums/".$row['filepath']."";
$image_name = "".$row['filename']."";
$thumb_path = "$path_albums/".$row['filepath']."/$path_thumb";
$image_id = "".$row['pid']."";
add_schaduw_thumb($image_name,$thumb_path,$image_id,$i);
$i = $i + 1;
}
echo "</td></tr></table>";
}
And in my Config file i have this line :
$thumb_regel = 2;
But my problem lies here in the function :
if ($i == $thumb_regel) {
echo "</td></tr></table>";
echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\"><tr><td align=\"center\">";
}
When i try a number in the place of $thumb_regel then the if loop workse fine.
But when i try to do it with the var $thumb_regel then he does nothing.
U know how this comes??